summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-26 03:02:25 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-26 03:02:25 +0000
commit407b8c0b7001b60f79181d62eb57e810f75e0e27 (patch)
tree6e5f5deaf078428c84a279cccd2cf9567e79e486
parent0de9375ee6e766cf15942c6582c79b0ac6d310f5 (diff)
downloadbusybox-w32-407b8c0b7001b60f79181d62eb57e810f75e0e27.tar.gz
busybox-w32-407b8c0b7001b60f79181d62eb57e810f75e0e27.tar.bz2
busybox-w32-407b8c0b7001b60f79181d62eb57e810f75e0e27.zip
trivial size reduction
-rw-r--r--e2fsprogs/e2fs_lib.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/e2fsprogs/e2fs_lib.c b/e2fsprogs/e2fs_lib.c
index cdf97352a..ea5c8026c 100644
--- a/e2fsprogs/e2fs_lib.c
+++ b/e2fsprogs/e2fs_lib.c
@@ -143,31 +143,31 @@ int fgetsetflags(const char *name, unsigned long *get_flags, unsigned long set_f
143/* Print file attributes on an ext2 file system */ 143/* Print file attributes on an ext2 file system */
144struct flags_name { 144struct flags_name {
145 unsigned long flag; 145 unsigned long flag;
146 const char *short_name; 146 char short_name;
147 const char *long_name; 147 const char *long_name;
148}; 148};
149 149
150static const struct flags_name flags_array[] = { 150static const struct flags_name flags_array[] = {
151 { EXT2_SECRM_FL, "s", "Secure_Deletion" }, 151 { EXT2_SECRM_FL, 's', "Secure_Deletion" },
152 { EXT2_UNRM_FL, "u" , "Undelete" }, 152 { EXT2_UNRM_FL, 'u' , "Undelete" },
153 { EXT2_SYNC_FL, "S", "Synchronous_Updates" }, 153 { EXT2_SYNC_FL, 'S', "Synchronous_Updates" },
154 { EXT2_DIRSYNC_FL, "D", "Synchronous_Directory_Updates" }, 154 { EXT2_DIRSYNC_FL, 'D', "Synchronous_Directory_Updates" },
155 { EXT2_IMMUTABLE_FL, "i", "Immutable" }, 155 { EXT2_IMMUTABLE_FL, 'i', "Immutable" },
156 { EXT2_APPEND_FL, "a", "Append_Only" }, 156 { EXT2_APPEND_FL, 'a', "Append_Only" },
157 { EXT2_NODUMP_FL, "d", "No_Dump" }, 157 { EXT2_NODUMP_FL, 'd', "No_Dump" },
158 { EXT2_NOATIME_FL, "A", "No_Atime" }, 158 { EXT2_NOATIME_FL, 'A', "No_Atime" },
159 { EXT2_COMPR_FL, "c", "Compression_Requested" }, 159 { EXT2_COMPR_FL, 'c', "Compression_Requested" },
160#ifdef ENABLE_COMPRESSION 160#ifdef ENABLE_COMPRESSION
161 { EXT2_COMPRBLK_FL, "B", "Compressed_File" }, 161 { EXT2_COMPRBLK_FL, 'B', "Compressed_File" },
162 { EXT2_DIRTY_FL, "Z", "Compressed_Dirty_File" }, 162 { EXT2_DIRTY_FL, 'Z', "Compressed_Dirty_File" },
163 { EXT2_NOCOMPR_FL, "X", "Compression_Raw_Access" }, 163 { EXT2_NOCOMPR_FL, 'X', "Compression_Raw_Access" },
164 { EXT2_ECOMPR_FL, "E", "Compression_Error" }, 164 { EXT2_ECOMPR_FL, 'E', "Compression_Error" },
165#endif 165#endif
166 { EXT3_JOURNAL_DATA_FL, "j", "Journaled_Data" }, 166 { EXT3_JOURNAL_DATA_FL, 'j', "Journaled_Data" },
167 { EXT2_INDEX_FL, "I", "Indexed_direcctory" }, 167 { EXT2_INDEX_FL, 'I', "Indexed_directory" },
168 { EXT2_NOTAIL_FL, "t", "No_Tailmerging" }, 168 { EXT2_NOTAIL_FL, 't', "No_Tailmerging" },
169 { EXT2_TOPDIR_FL, "T", "Top_of_Directory_Hierarchies" }, 169 { EXT2_TOPDIR_FL, 'T', "Top_of_Directory_Hierarchies" },
170 { 0, NULL, NULL } 170 { 0, '\0', NULL }
171}; 171};
172 172
173void print_flags(FILE *f, unsigned long flags, unsigned options) 173void print_flags(FILE *f, unsigned long flags, unsigned options)
@@ -176,7 +176,7 @@ void print_flags(FILE *f, unsigned long flags, unsigned options)
176 176
177 if (options & PFOPT_LONG) { 177 if (options & PFOPT_LONG) {
178 int first = 1; 178 int first = 1;
179 for (fp = flags_array; fp->flag != 0; fp++) { 179 for (fp = flags_array; fp->short_name; fp++) {
180 if (flags & fp->flag) { 180 if (flags & fp->flag) {
181 if (!first) 181 if (!first)
182 fputs(", ", f); 182 fputs(", ", f);
@@ -187,11 +187,11 @@ void print_flags(FILE *f, unsigned long flags, unsigned options)
187 if (first) 187 if (first)
188 fputs("---", f); 188 fputs("---", f);
189 } else { 189 } else {
190 for (fp = flags_array; fp->flag != 0; fp++) { 190 for (fp = flags_array; fp->short_name; fp++) {
191 const char *p = "-"; 191 char c = '-';
192 if (flags & fp->flag) 192 if (flags & fp->flag)
193 p = fp->short_name; 193 c = fp->short_name;
194 fputs(p, f); 194 fputc(c, f);
195 } 195 }
196 } 196 }
197} 197}