Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/df.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1122 by niro, Sun May 30 11:32:42 2010 UTC revision 1123 by niro, Wed Aug 18 21:56:57 2010 UTC
# Line 114  int df_main(int argc UNUSED_PARAM, char Line 114  int df_main(int argc UNUSED_PARAM, char
114   while (1) {   while (1) {
115   const char *device;   const char *device;
116   const char *mount_point;   const char *mount_point;
 #if ENABLE_FEATURE_ASSUME_UNICODE  
  size_t dev_len;  
 #endif  
117    
118   if (mount_table) {   if (mount_table) {
119   mount_entry = getmntent(mount_table);   mount_entry = getmntent(mount_table);
# Line 177  int df_main(int argc UNUSED_PARAM, char Line 174  int df_main(int argc UNUSED_PARAM, char
174   }   }
175  #endif  #endif
176    
177  #if ENABLE_FEATURE_ASSUME_UNICODE  #if ENABLE_UNICODE_SUPPORT
178   dev_len = unicode_strlen(device);   {
179   if (dev_len > 20) {   uni_stat_t uni_stat;
180   printf("%s\n%20s", device, "");   char *uni_dev = unicode_conv_to_printable(&uni_stat, device);
181   } else {   if (uni_stat.unicode_width > 20) {
182   printf("%s%*s", device, 20 - (int)dev_len, "");   printf("%s\n%20s", uni_dev, "");
183     } else {
184     printf("%s%*s", uni_dev, 20 - (int)uni_stat.unicode_width, "");
185     }
186     free(uni_dev);
187   }   }
188  #else  #else
189   if (printf("\n%-20s" + 1, device) > 20)   if (printf("\n%-20s" + 1, device) > 20)

Legend:
Removed from v.1122  
changed lines
  Added in v.1123