]> git.saurik.com Git - hfs.git/blob - fsck_hfs/fsck_strings.c
hfs-226.1.1.tar.gz
[hfs.git] / fsck_hfs / fsck_strings.c
1 /*
2 * Copyright (c) 2008, 2010-2011 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 #include "fsck_messages.h"
24 #include "fsck_msgnums.h"
25
26 /*
27 * Standard fsck message strings (not specific to any filesystem).
28 *
29 * The message numbers (first field) for these are defined
30 * in fsck_msgnums.h; messages can be added to the array in
31 * any order, as fsckAddMessages will sort them based on the
32 * message number field. The array needs to end with an all-0
33 * field, and no message string can be NULL.
34 *
35 * The last field in the structure is a pointer to a constant,
36 * variable-length array describing the arguments to the message.
37 * Most messages have no arguments; if a message does have arguments,
38 * it needs to be one of the types defined in fsck_msgnums.h (enum
39 * fsck_arg_type). The format specifier in the message string can be a
40 * SIMPLE printf-style: %d, %i, %u, %o, %x, %s, %c, %p; it needs to be
41 * converted at run-time to a Cocoa-style specifier, and the conversion
42 * routine does not handle all of the possible printf variations.
43 * (See convertfmt() in fsck_messages.c for details.)
44 */
45
46 fsck_message_t
47 fsck_messages_common[] = {
48 /* Message Number Message Type Verbosity Arguments */
49 /* 101 - 110 */
50 { fsckCheckingVolume, "Checking volume.", fsckMsgVerify, fsckLevel0, 0, },
51 { fsckRecheckingVolume, "Rechecking volume.", fsckMsgVerify, fsckLevel0, 0, },
52 { fsckRepairingVolume, "Repairing volume.", fsckMsgRepair, fsckLevel0, 0, },
53 { fsckVolumeOK, "The volume %s appears to be OK.", fsckMsgSuccess, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
54 { fsckRepairSuccessful, "The volume %s was repaired successfully.", fsckMsgSuccess, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
55 { fsckVolumeVerifyIncomplete, "The volume %s could not be verified completely.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
56 { fsckVolumeVerifyIncompleteNoRepair, "The volume %s could not be verified completely and can not be repaired.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
57 { fsckVolumeCorruptNoRepair, "The volume %s was found corrupt and can not be repaired.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
58 { fsckVolumeCorruptNeedsRepair, "The volume %s was found corrupt and needs to be repaired.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
59 { fsckVolumeNotRepaired, "The volume %s could not be repaired.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
60
61 /* 111 - 122 */
62 { fsckVolumeNotRepairedInUse, "The volume %s cannot be repaired when it is in use.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
63 { fsckVolumeNotVerifiedInUse, "The volume %s cannot be verified when it is in use.", fsckMsgFail, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
64 { fsckFileFolderDamage, "File/folder %s may be damaged.", fsckMsgDamageInfo, fsckLevel0, 1, (const int[]) { fsckTypePath } },
65 { fsckFileFolderNotRepaired, "File/folder %s could not be repaired.", fsckMsgDamageInfo, fsckLevel0, 1, (const int[]) { fsckTypePath } },
66 { fsckVolumeNotRepairedTries, "The volume %s could not be repaired after %d attempts.", fsckMsgFail, fsckLevel0, 2, (const int[]) { fsckTypeVolume, fsckTypeInt }},
67 { fsckLostFoundDirectory, "Look for missing items in %s directory.", fsckMsgRepair, fsckLevel0, 1, (const int[]) { fsckTypeDirectory } },
68 { fsckCorruptFilesDirectory, "Look for links to corrupt files in %s directory.", fsckMsgDamageInfo, fsckLevel0, 1, (const int[]) { fsckTypeDirectory }},
69 { fsckInformation, "Executing %s (version %s).", fsckMsgInfo, fsckLevel1, 2, (const int[]) { fsckTypeString, fsckTypeString }},
70 { fsckProgress, "%d %%", fsckMsgProgress, fsckLevel0, 1, (const int[]) { fsckTypeProgress } },
71 { fsckTrimming, "Trimming unused blocks.", fsckMsgVerify, fsckLevel0, 0 },
72 { fsckVolumeName, "The volume name is %s", fsckMsgInfo, fsckLevel0, 1, (const int[]) { fsckTypeVolume } },
73 { fsckVolumeModified, "The volume was modified", fsckMsgNotice, fsckLevel0, 0 },
74 { fsckLimitedRepairs, "Limited repair mode, not all repairs available", fsckMsgInfo, fsckLevel0, 0 },
75 { 0, },
76 };
77