Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/e2fsprogs/old_e2fsprogs/fsck.c

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

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 20  Line 20 
20   * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,   * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
21   *      2001, 2002, 2003, 2004, 2005 by  Theodore Ts'o.   *      2001, 2002, 2003, 2004, 2005 by  Theodore Ts'o.
22   *   *
23   * %Begin-Header%   * Licensed under GPLv2, see file LICENSE in this tarball for details.
  * This file may be redistributed under the terms of the GNU Public  
  * License.  
  * %End-Header%  
24   */   */
25    
26  #include <sys/types.h>  #include <sys/types.h>
# Line 380  static struct fs_info *create_fs_device( Line 377  static struct fs_info *create_fs_device(
377  {  {
378   struct fs_info *fs;   struct fs_info *fs;
379    
380   if (!(fs = malloc(sizeof(struct fs_info))))   fs = xmalloc(sizeof(struct fs_info));
  return NULL;  
381    
382   fs->device = string_copy(device);   fs->device = string_copy(device);
383   fs->mountpt = string_copy(mntpnt);   fs->mountpt = string_copy(mntpnt);
# Line 576  static int execute(const char *type, con Line 572  static int execute(const char *type, con
572   struct fsck_instance *inst, *p;   struct fsck_instance *inst, *p;
573   pid_t   pid;   pid_t   pid;
574    
575   inst = malloc(sizeof(struct fsck_instance));   inst = xzalloc(sizeof(struct fsck_instance));
  if (!inst)  
  return ENOMEM;  
  memset(inst, 0, sizeof(struct fsck_instance));  
576    
577   prog = xasprintf("fsck.%s", type);   prog = xasprintf("fsck.%s", type);
578   argv[0] = prog;   argv[0] = prog;
# Line 1004  static int ignore(struct fs_info *fs) Line 997  static int ignore(struct fs_info *fs)
997   s = find_fsck(fs->type);   s = find_fsck(fs->type);
998   if (s == NULL) {   if (s == NULL) {
999   if (wanted)   if (wanted)
1000   bb_error_msg("cannot check %s: fsck.%s not found",   bb_error_msg("can't check %s: fsck.%s not found",
1001   fs->device, fs->type);   fs->device, fs->type);
1002   return 1;   return 1;
1003   }   }
# Line 1206  static void PRS(int argc, char **argv) Line 1199  static void PRS(int argc, char **argv)
1199   * /proc/partitions isn't found.   * /proc/partitions isn't found.
1200   */   */
1201   if (access("/proc/partitions", R_OK) < 0) {   if (access("/proc/partitions", R_OK) < 0) {
1202   bb_perror_msg_and_die("cannot open /proc/partitions "   bb_perror_msg_and_die("can't open /proc/partitions "
1203   "(is /proc mounted?)");   "(is /proc mounted?)");
1204   }   }
1205   /*   /*
# Line 1218  static void PRS(int argc, char **argv) Line 1211  static void PRS(int argc, char **argv)
1211   "must be root to scan for matching filesystems: %s\n", arg);   "must be root to scan for matching filesystems: %s\n", arg);
1212   else   else
1213   bb_error_msg_and_die(   bb_error_msg_and_die(
1214   "cannot find matching filesystem: %s", arg);   "can't find matching filesystem: %s", arg);
1215   }   }
1216   devices[num_devices++] = dev ? dev : string_copy(arg);   devices[num_devices++] = dev ? dev : string_copy(arg);
1217   continue;   continue;

Legend:
Removed from v.983  
changed lines
  Added in v.984