Hi, I tried to modify getfattr/getfattr.c. The following is my debdiff:
diff -Nru attr-2.4.46/debian/changelog attr-2.4.46/debian/changelog --- attr-2.4.46/debian/changelog 2011-06-24 01:37:52.000000000 -0400 +++ attr-2.4.46/debian/changelog 2011-06-27 04:19:25.000000000 -0400 @@ -1,3 +1,10 @@ +attr (1:2.4.46-1.1) unstable; urgency=low + + * Non-maintainer upload. + * fix bug 520659, modify do_print() return code. + + -- Zhi Li <lizhi1...@gmail.com> Mon, 27 Jun 2011 04:18:16 -0400 + attr (1:2.4.46-1) unstable; urgency=low * New upstream release (Closes: #626622). diff -Nru attr-2.4.46/debian/patches/10_bts520659_fix_return.patch attr-2.4.46/debian/patches/10_bts520659_fix_return.patch --- attr-2.4.46/debian/patches/10_bts520659_fix_return.patch 1969-12-31 19:00:00.000000000 -0500 +++ attr-2.4.46/debian/patches/10_bts520659_fix_return.patch 2011-06-27 04:17:20.000000000 -0400 @@ -0,0 +1,32 @@ +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520659 + +Index: attr-2.4.46/getfattr/getfattr.c +=================================================================== +--- attr-2.4.46.orig/getfattr/getfattr.c 2011-06-27 04:12:42.983277707 -0400 ++++ attr-2.4.46/getfattr/getfattr.c 2011-06-27 04:13:16.123308055 -0400 +@@ -352,7 +352,7 @@ + int do_print(const char *path, const struct stat *stat, int walk_flags, + void *unused) + { +- int header_printed = 0; ++ int header_printed = 0, ret; + + if (walk_flags & WALK_TREE_FAILED) { + fprintf(stderr, "%s: %s: %s\n", progname, xquote(path, "\n\r"), +@@ -361,13 +361,13 @@ + } + + if (opt_name) +- print_attribute(path, opt_name, &header_printed); ++ ret = print_attribute(path, opt_name, &header_printed); + else +- list_attributes(path, &header_printed); ++ ret = list_attributes(path, &header_printed); + + if (header_printed) + puts(""); +- return 0; ++ return ret; + } + + void help(void) diff -Nru attr-2.4.46/debian/patches/series attr-2.4.46/debian/patches/series --- attr-2.4.46/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ attr-2.4.46/debian/patches/series 2011-06-27 04:12:29.000000000 -0400 @@ -0,0 +1 @@ +10_bts520659_fix_return.patch -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org