[Bug 4435] listing of files in long format shows incorrect sizes
bugzilla at busybox.net
bugzilla at busybox.net
Thu Nov 3 00:39:31 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=4435
--- Comment #5 from Denys Vlasenko <vda.linux at googlemail.com> 2011-11-03 00:39:30 UTC ---
Can't reproduce even with your .config.
Please add the following three lines marked with ^^^^^^^^ below in ls.c in
my_stat() function, recompile, rerun "ls -l /etc", post the resulting output.
if ((option_mask32 & OPT_L) || force_follow) {
#if ENABLE_SELINUX
if (is_selinux_enabled()) {
getfilecon(fullname, &cur->sid);
}
#endif
bb_error_msg("stat '%s'", fullname);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if (stat(fullname, &statbuf)) {
bb_simple_perror_msg(fullname);
G.exit_code = EXIT_FAILURE;
free(cur);
return NULL;
}
cur->dn_mode_stat = statbuf.st_mode;
} else {
#if ENABLE_SELINUX
if (is_selinux_enabled()) {
lgetfilecon(fullname, &cur->sid);
}
#endif
bb_error_msg("lstat '%s'", fullname);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if (lstat(fullname, &statbuf)) {
bb_simple_perror_msg(fullname);
G.exit_code = EXIT_FAILURE;
free(cur);
return NULL;
}
cur->dn_mode_lstat = statbuf.st_mode;
}
/* cur->dstat = statbuf: */
cur->dn_mode = statbuf.st_mode ;
cur->dn_size = statbuf.st_size ;
bb_error_msg("size:%llu", (long long)(cur->dn_size));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list