md5_sha1_sum: fix mishandling when run as /bin/md5sum (with path)

chown/chgrp: completely match coreutils 6.8 wrt symlink handling

function                                             old     new   delta
recursive_action                                     411     422     +11
arith                                               2033    2042      +9
collect_blk                                          467     474      +7
dhcprelay_main                                      1122    1125      +3
fsck_main                                           1909    1911      +2
singlemount                                         4555    4547      -8
xmalloc_realpath                                      14       -     -14
get_lcm                                              123     105     -18
ed_main                                             3111    3084     -27
chown_main                                           217     183     -34
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 5/4 up/down: 32/-101)           Total: -69 bytes
   text    data     bss     dec     hex filename
 684132    2744   14000  700876   ab1cc busybox_old
 684060    2744   14000  700804   ab184 busybox_unstripped
This commit is contained in:
Denis Vlasenko
2007-07-05 00:12:55 +00:00
parent 42b3dea9bf
commit d166f83d74
4 changed files with 51 additions and 48 deletions

View File

@ -214,15 +214,16 @@ extern int is_directory(const char *name, int followLinks, struct stat *statBuf)
extern int remove_file(const char *path, int flags);
extern int copy_file(const char *source, const char *dest, int flags);
enum {
ACTION_RECURSE = (1 << 0),
ACTION_FOLLOWLINKS = (1 << 1),
ACTION_DEPTHFIRST = (1 << 2),
/*ACTION_REVERSE = (1 << 3), - unused */
ACTION_RECURSE = (1 << 0),
ACTION_FOLLOWLINKS = (1 << 1),
ACTION_FOLLOWLINKS_L0 = (1 << 2),
ACTION_DEPTHFIRST = (1 << 3),
/*ACTION_REVERSE = (1 << 4), - unused */
};
extern int recursive_action(const char *fileName, unsigned flags,
int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData, int depth),
int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData, int depth),
void* userData, const unsigned depth);
void* userData, unsigned depth);
extern int device_open(const char *device, int mode);
extern int get_console_fd(void);
extern char *find_block_device(const char *path);