lpd: spool mode added by Vladimir
lpr: more robust error reporting *: introduce and use xchroot libbb: full_read/write now will report partial data counts prior to error isdirectory.c: style fixes lpd_main 249 486 +237 xchroot - 29 +29 get_response_or_say_and_die 110 139 +29 full_write 52 60 +8 full_read 55 63 +8 static.newline 1 - -1 switch_root_main 404 400 -4 chpst_main 1089 1079 -10 getopt32 1370 1359 -11 chroot_main 115 101 -14 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 4/4 up/down: 311/-40) Total: 271 bytes text data bss dec hex filename 798472 728 7484 806684 c4f1c busybox_old 798775 728 7484 806987 c504b busybox_unstripped
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
/*
|
||||
* Return TRUE if a fileName is a directory.
|
||||
* Return TRUE if fileName is a directory.
|
||||
* Nonexistent files return FALSE.
|
||||
*/
|
||||
int is_directory(const char *fileName, const int followLinks, struct stat *statBuf)
|
||||
@@ -21,8 +21,8 @@ int is_directory(const char *fileName, const int followLinks, struct stat *statB
|
||||
struct stat astatBuf;
|
||||
|
||||
if (statBuf == NULL) {
|
||||
/* set from auto stack buffer */
|
||||
statBuf = &astatBuf;
|
||||
/* use auto stack buffer */
|
||||
statBuf = &astatBuf;
|
||||
}
|
||||
|
||||
if (followLinks)
|
||||
@@ -30,10 +30,7 @@ int is_directory(const char *fileName, const int followLinks, struct stat *statB
|
||||
else
|
||||
status = lstat(fileName, statBuf);
|
||||
|
||||
if (status < 0 || !(S_ISDIR(statBuf->st_mode))) {
|
||||
status = FALSE;
|
||||
}
|
||||
else status = TRUE;
|
||||
status = (status == 0 && S_ISDIR(statBuf->st_mode));
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user