libbb: add xfstat function

function                                             old     new   delta
xfstat                                                 -      25     +25
mkfs_ext2_main                                      2421    2423      +2
mkfs_reiser_main                                    1197    1194      -3
next                                                 312     307      -5
ar_main                                              533     522     -11
mkfs_minix_main                                     2938    2924     -14
mkfs_vfat_main                                      1511    1495     -16
writeTarFile                                         272     255     -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
Denys Vlasenko
2010-08-31 12:42:06 +02:00
parent 4e7dd3c363
commit 8d3e225a2d
13 changed files with 29 additions and 21 deletions

View File

@@ -63,9 +63,9 @@ int ubi_attach_detach_main(int argc UNUSED_PARAM, char **argv)
ubi_ctrl = argv[optind];
fd = xopen(ubi_ctrl, O_RDWR);
//fstat(fd, &st);
//xfstat(fd, &st, ubi_ctrl);
//if (!S_ISCHR(st.st_mode))
// bb_error_msg_and_die("'%s' is not a char device", ubi_ctrl);
// bb_error_msg_and_die("%s: not a char device", ubi_ctrl);
if (do_attach) {
if (!(opts & OPTION_M))