On Fri, 25 Mar 2011 12:31:05 +0300
Roman Borisov <[email protected]> wrote:

> +     /* Compare stats to check if the files are the same physically;
> +        See diffutils: src/system.h for full description */
> +     if (stb[0].st_ino == stb[1].st_ino && 
> +             stb[0].st_dev == stb[1].st_dev &&
> +             stb[0].st_mode == stb[1].st_mode &&
> +             stb[0].st_nlink == stb[1].st_nlink &&
> +             stb[0].st_uid == stb[1].st_uid &&
> +             stb[0].st_gid == stb[1].st_gid &&
> +             stb[0].st_size == stb[1].st_size &&
> +             stb[0].st_mtime == stb[1].st_mtime &&
> +             stb[0].st_ctime == stb[1].st_ctime) {
> +             /* files are physically the same; no need to compare them */
> +             return STATUS_SAME;
> +     }

Just wondering, did not test: couldn't you just memcmp stb[0] and stb[1]?
How would that affect code size?
-- 
Stefan Seyfried

"Dispatch war rocket Ajax to bring back his body!"
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to