btrfsprogs/0129-btrfs-progs-Fix-compilation-errors-with-btrfs-select.patch
David Sterba db07609875 - btrfs-progs-fix-open_ctree_usage_segfaults.patch: fix
segfaults from bnc#710486 due to unchecked usage of return
  value of open_ctree()
  [fixed compilation warnings]

- pull upstream, replace existing patches, spec update
- update 'restore' utility
  - lzo support
  - tools may now take earlies superblock when opening the fs
  - other fixes
- pull integration-20111030 branch
  - mkfs: force mkfs if desired
  - other fixes
- add btrfs-dump-super to mkinitrd
- other fixes
  - skip non-existent devices or without media
  - documentation updates
  - scrubbing single device
  - graceful error handling when opening fs fails

- updated mkinitrd script to scan devices before mount (bnc#727383)

OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=115
2011-12-14 23:25:51 +00:00

37 lines
987 B
Diff

From 3ceceda914e19a3f7982c5050e6ffb23522071f2 Mon Sep 17 00:00:00 2001
From: David Marcin <djmarcin@google.com>
Date: Tue, 6 Dec 2011 12:14:54 -0800
Subject: [PATCH 30/35] btrfs-progs: Fix compilation errors with
btrfs-select-super.c introduced by refactoring.
Signed-off-by: David Marcin <djmarcin@google.com>
---
btrfs-select-super.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/btrfs-select-super.c b/btrfs-select-super.c
index 4d27f1b..079986a 100644
--- a/btrfs-select-super.c
+++ b/btrfs-select-super.c
@@ -48,7 +48,7 @@ int main(int ac, char **av)
int num;
u64 bytenr = 0;
int commit = 0;
- int use_lowest_bdev = 0;
+ int use_earliest_bdev = 0;
int fp;
while(1) {
@@ -93,7 +93,7 @@ int main(int ac, char **av)
return -EBUSY;
}
- fp = open(av[optind], O_CREAT|O_RDRW, 0600);
+ fp = open(av[optind], O_CREAT|O_RDWR, 0600);
if (fp < 0) {
fprintf(stderr, "Could not open %s\n", av[optind]);
return 1;
--
1.7.6.233.gd79bc