Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/chown.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 62  static int FAST_FUNC fileAction(const ch Line 62  static int FAST_FUNC fileAction(const ch
62  {  {
63  #define param  (*(struct param_t*)vparam)  #define param  (*(struct param_t*)vparam)
64  #define opt option_mask32  #define opt option_mask32
65   uid_t u = (param.ugid.uid == (uid_t)-1) ? statbuf->st_uid : param.ugid.uid;   uid_t u = (param.ugid.uid == (uid_t)-1L) ? statbuf->st_uid : param.ugid.uid;
66   gid_t g = (param.ugid.gid == (gid_t)-1) ? statbuf->st_gid : param.ugid.gid;   gid_t g = (param.ugid.gid == (gid_t)-1L) ? statbuf->st_gid : param.ugid.gid;
67    
68   if (param.chown_func(fileName, u, g) == 0) {   if (param.chown_func(fileName, u, g) == 0) {
69   if (OPT_VERBOSE   if (OPT_VERBOSE
# Line 75  static int FAST_FUNC fileAction(const ch Line 75  static int FAST_FUNC fileAction(const ch
75   return TRUE;   return TRUE;
76   }   }
77   if (!OPT_QUIET)   if (!OPT_QUIET)
78   bb_simple_perror_msg(fileName); /* A filename can have % in it... */   bb_simple_perror_msg(fileName);
79   return FALSE;   return FALSE;
80  #undef opt  #undef opt
81  #undef param  #undef param
# Line 87  int chown_main(int argc UNUSED_PARAM, ch Line 87  int chown_main(int argc UNUSED_PARAM, ch
87   int opt, flags;   int opt, flags;
88   struct param_t param;   struct param_t param;
89    
90   param.ugid.uid = -1;   /* Just -1 might not work: uid_t may be unsigned long */
91   param.ugid.gid = -1;   param.ugid.uid = -1L;
92     param.ugid.gid = -1L;
93    
94  #if ENABLE_FEATURE_CHOWN_LONG_OPTIONS  #if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
95   applet_long_options = chown_longopts;   applet_long_options = chown_longopts;

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