Hello community, here is the log from the commit of package btrfsprogs for openSUSE:Factory checked in at Mon Jul 4 09:35:20 CEST 2011. -------- --- btrfsprogs/btrfsprogs.changes 2011-03-21 13:01:35.000000000 +0100 +++ /mounts/work_src_done/STABLE/btrfsprogs/btrfsprogs.changes 2011-07-01 16:32:19.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Jul 1 16:31:44 CEST 2011 - dmueller@suse.de + +- fix failing on deleted loop mounts (bnc#697671) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- ignore-deleted-loopmounts.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btrfsprogs.spec ++++++ --- /var/tmp/diff_new_pack.soeEZJ/_old 2011-07-04 09:33:52.000000000 +0200 +++ /var/tmp/diff_new_pack.soeEZJ/_new 2011-07-04 09:33:52.000000000 +0200 @@ -20,7 +20,7 @@ Name: btrfsprogs Url: http://oss.oracle.com/~mason/btrfs/ Version: 0.19 -Release: 20 +Release: 39 %define tar_version v0.19-35-g1b444cd Summary: Btrfs File System Utilities License: GNU General Public License (GPL) @@ -29,6 +29,7 @@ Source: btrfs-progs-%{tar_version}.tar.bz2 Patch0: memleak-fix.diff Patch1: 0001-Plug-Memory-leak-in-find_and_setup_log_root.patch +Patch2: ignore-deleted-loopmounts.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libacl-devel libext2fs-devel libuuid-devel zlib-devel # for /bin/true @@ -42,6 +43,7 @@ %setup -q -n btrfs-progs-%{tar_version} %patch0 %patch1 -p1 +%patch2 -p1 %build make %{?jobs:-j%jobs} CFLAGS="%{optflags}" all convert ++++++ ignore-deleted-loopmounts.diff ++++++ diff --git a/utils.c b/utils.c index fd894f3..4f089f5 100644 --- a/utils.c +++ b/utils.c @@ -633,19 +633,29 @@ int is_same_blk_file(const char* a, const char* b) char real_a[PATH_MAX]; char real_b[PATH_MAX]; - if(!realpath(a, real_a) || - !realpath(b, real_b)) - { - return -errno; - } + if(!realpath(a, real_a)) + strcpy(real_a, a); + + if (!realpath(b, real_b)) + strcpy(real_b, b); /* Identical path? */ if(strcmp(real_a, real_b) == 0) return 1; - if(stat(a, &st_buf_a) < 0 || - stat(b, &st_buf_b) < 0) - { + if(stat(a, &st_buf_a) < 0) + { + if (errno == ENOENT) + return 0; + + return -errno; + } + + if(stat(b, &st_buf_b) < 0) + { + if (errno == ENOENT) + return 0; + return -errno; } @@ -684,10 +694,12 @@ int is_same_loop_file(const char* a, const char* b) if((ret = is_loop_device(a)) < 0) { return ret; } else if(ret) { - if((ret = resolve_loop_device(a, res_a, sizeof(res_a))) < 0) + if((ret = resolve_loop_device(a, res_a, sizeof(res_a))) < 0) { + if (errno != EPERM) return ret; - - final_a = res_a; + } + else + final_a = res_a; } else { final_a = a; } @@ -696,15 +708,17 @@ int is_same_loop_file(const char* a, const char* b) if((ret = is_loop_device(b)) < 0) { return ret; } else if(ret) { - if((ret = resolve_loop_device(b, res_b, sizeof(res_b))) < 0) - return ret; - - final_b = res_b; + if((ret = resolve_loop_device(b, res_b, sizeof(res_b))) < 0) { + if (errno != EPERM) + return ret; + } + else + final_b = res_b; } else { final_b = b; } - return is_same_blk_file(final_a, final_b); + return is_same_blk_file(final_a, final_b); } /* Checks if a file exists and is a block or regular file*/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org