Accepting request 251480 from home:dsterba:branches:filesystems

upstream release, update local patches tha are going to be merged in the next release (fingers crossed)

OBS-URL: https://build.opensuse.org/request/show/251480
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=172
This commit is contained in:
David Sterba 2014-09-22 21:20:45 +00:00 committed by Git OBS Bridge
parent c9638392a2
commit 610e9bfd8c
15 changed files with 104 additions and 187 deletions

View File

@ -597,7 +597,7 @@ Index: btrfs-progs-v3.16/cmds-filesystem.c
#include "list_sort.h" #include "list_sort.h"
#include "disk-io.h" #include "disk-io.h"
@@ -112,50 +113,6 @@ static const char * const filesystem_cmd @@ -112,55 +113,6 @@ static const char * const filesystem_cmd_group_usage[] = {
NULL NULL
}; };
@ -609,7 +609,10 @@ Index: btrfs-progs-v3.16/cmds-filesystem.c
- -
-static char *group_type_str(u64 flag) -static char *group_type_str(u64 flag)
-{ -{
- switch (flag & BTRFS_BLOCK_GROUP_TYPE_MASK) { - u64 mask = BTRFS_BLOCK_GROUP_TYPE_MASK |
- BTRFS_SPACE_INFO_GLOBAL_RSV;
-
- switch (flag & mask) {
- case BTRFS_BLOCK_GROUP_DATA: - case BTRFS_BLOCK_GROUP_DATA:
- return "Data"; - return "Data";
- case BTRFS_BLOCK_GROUP_SYSTEM: - case BTRFS_BLOCK_GROUP_SYSTEM:
@ -618,6 +621,8 @@ Index: btrfs-progs-v3.16/cmds-filesystem.c
- return "Metadata"; - return "Metadata";
- case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA: - case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA:
- return "Data+Metadata"; - return "Data+Metadata";
- case BTRFS_SPACE_INFO_GLOBAL_RSV:
- return "GlobalReserve";
- default: - default:
- return "unknown"; - return "unknown";
- } - }
@ -739,7 +744,7 @@ Index: btrfs-progs-v3.16/utils.c
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "radix-tree.h"
#include "ctree.h" #include "ctree.h"
@@ -2436,3 +2438,13 @@ int test_isdir(const char *path) @@ -2439,3 +2441,13 @@ int test_isdir(const char *path)
return S_ISDIR(st.st_mode); return S_ISDIR(st.st_mode);
} }
@ -753,15 +758,18 @@ Index: btrfs-progs-v3.16/utils.c
+ else + else
+ return sfs.f_bsize * sfs.f_blocks; + return sfs.f_bsize * sfs.f_blocks;
+} +}
Index: btrfs-progs-v3.16/utils.h diff --git a/utils.h b/utils.h
=================================================================== index fd25126dac81..c683818e003f 100644
--- btrfs-progs-v3.16.orig/utils.h --- a/utils.h
+++ btrfs-progs-v3.16/utils.h +++ b/utils.h
@@ -118,6 +118,7 @@ int test_uuid_unique(char *fs_uuid); @@ -114,6 +114,7 @@ int find_mount_root(const char *path, char **mount_root);
int test_minimum_size(const char *file, u32 leafsize); int get_device_info(int fd, u64 devid,
int test_issubvolname(const char *name); struct btrfs_ioctl_dev_info_args *di_args);
int test_isdir(const char *path); int test_uuid_unique(char *fs_uuid);
+u64 disk_size(char *path); +u64 disk_size(char *path);
/* int test_minimum_size(const char *file, u32 leafsize);
* Btrfs minimum size calculation is complicated, it should include at least: int test_issubvolname(const char *name);
--
2.1.1

View File

@ -48,14 +48,15 @@ Index: btrfs-progs-v3.16/Makefile
extent-cache.o extent_io.o volumes.o utils.o repair.o \ extent-cache.o extent_io.o volumes.o utils.o repair.o \
qgroup.o raid6.o free-space-cache.o list_sort.o props.o \ qgroup.o raid6.o free-space-cache.o list_sort.o props.o \
- ulist.o qgroup-verify.o - ulist.o qgroup-verify.o
+ ulist.o qgroup-verify.o string_table.o + ulist.o qgroup-verify.o string-table.o
cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \ cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \ cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
Index: btrfs-progs-v3.16/string_table.c diff --git a/string-table.c b/string-table.c
=================================================================== new file mode 100644
index 000000000000..701f2147a3cc
--- /dev/null --- /dev/null
+++ btrfs-progs-v3.16/string_table.c +++ b/string-table.c
@@ -0,0 +1,156 @@ @@ -0,0 +1,156 @@
+/* +/*
+ * This program is free software; you can redistribute it and/or + * This program is free software; you can redistribute it and/or
@ -78,7 +79,7 @@ Index: btrfs-progs-v3.16/string_table.c
+#include <stdio.h> +#include <stdio.h>
+#include <stdarg.h> +#include <stdarg.h>
+ +
+#include "string_table.h" +#include "string-table.h"
+ +
+/* +/*
+ * This function create an array of char * which will represent a table + * This function create an array of char * which will represent a table
@ -213,10 +214,11 @@ Index: btrfs-progs-v3.16/string_table.c
+ free(tab); + free(tab);
+ +
+} +}
Index: btrfs-progs-v3.16/string_table.h diff --git a/string-table.h b/string-table.h
=================================================================== new file mode 100644
index 000000000000..83c4425d5f76
--- /dev/null --- /dev/null
+++ btrfs-progs-v3.16/string_table.h +++ b/string-table.h
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+/* +/*
+ * This program is free software; you can redistribute it and/or + * This program is free software; you can redistribute it and/or

View File

@ -26,7 +26,7 @@ Index: btrfs-progs-v3.16/cmds-fi-disk_usage.c
#include "utils.h" #include "utils.h"
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
+#include "string_table.h" +#include "string-table.h"
#include "commands.h" #include "commands.h"
@ -561,13 +561,13 @@ Index: btrfs-progs-v3.16/utils.c
+ return "unknown"; + return "unknown";
+ } + }
+} +}
Index: btrfs-progs-v3.16/utils.h diff --git a/utils.h b/utils.h
=================================================================== index c683818e003f..5c364b61dffa 100644
--- btrfs-progs-v3.16.orig/utils.h --- a/utils.h
+++ btrfs-progs-v3.16/utils.h +++ b/utils.h
@@ -119,6 +119,11 @@ int test_minimum_size(const char *file, @@ -115,6 +115,11 @@ int get_device_info(int fd, u64 devid,
int test_issubvolname(const char *name); struct btrfs_ioctl_dev_info_args *di_args);
int test_isdir(const char *path); int test_uuid_unique(char *fs_uuid);
u64 disk_size(char *path); u64 disk_size(char *path);
+int get_device_info(int fd, u64 devid, +int get_device_info(int fd, u64 devid,
+ struct btrfs_ioctl_dev_info_args *di_args); + struct btrfs_ioctl_dev_info_args *di_args);
@ -575,5 +575,8 @@ Index: btrfs-progs-v3.16/utils.h
+const char* group_type_str(u64 flags); +const char* group_type_str(u64 flags);
+const char* group_profile_str(u64 flags); +const char* group_profile_str(u64 flags);
/* int test_minimum_size(const char *file, u32 leafsize);
* Btrfs minimum size calculation is complicated, it should include at least: int test_issubvolname(const char *name);
--
2.1.1

View File

@ -13,28 +13,11 @@ Signed-off-by: David Sterba <dsterba@suse.cz>
utils.c | 7 ++++++- utils.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletion(-) 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ctree.h b/ctree.h
index 8ac17619b9dc..5c43fc5f5f6e 100644
--- a/ctree.h
+++ b/ctree.h
@@ -862,6 +862,12 @@ struct btrfs_csum_item {
/* used in struct btrfs_balance_args fields */
#define BTRFS_AVAIL_ALLOC_BIT_SINGLE (1ULL << 48)
+/*
+ * GLOBAL_RSV does not exist as a on-disk block group type and is used
+ * internally for exporting info about global block reserve from space infos
+ */
+#define BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49)
+
#define BTRFS_QGROUP_STATUS_OFF 0
#define BTRFS_QGROUP_STATUS_ON 1
#define BTRFS_QGROUP_STATUS_SCANNING 2
diff --git a/utils.c b/utils.c diff --git a/utils.c b/utils.c
index f2ab416c28b2..ca150404ea6f 100644 index f2ab416c28b2..ca150404ea6f 100644
--- a/utils.c --- a/utils.c
+++ b/utils.c +++ b/utils.c
@@ -2240,7 +2240,10 @@ u64 get_partition_size(char *dev) @@ -2473,7 +2473,10 @@ u64 get_partition_size(char *dev)
*/ */
const char *group_type_str(u64 flag) const char *group_type_str(u64 flag)
{ {
@ -46,7 +29,7 @@ index f2ab416c28b2..ca150404ea6f 100644
case BTRFS_BLOCK_GROUP_DATA: case BTRFS_BLOCK_GROUP_DATA:
return "Data"; return "Data";
case BTRFS_BLOCK_GROUP_SYSTEM: case BTRFS_BLOCK_GROUP_SYSTEM:
@@ -2249,6 +2252,8 @@ const char *group_type_str(u64 flag) @@ -2482,6 +2485,8 @@ const char *group_type_str(u64 flag)
return "Metadata"; return "Metadata";
case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA: case BTRFS_BLOCK_GROUP_DATA|BTRFS_BLOCK_GROUP_METADATA:
return "Data+Metadata"; return "Data+Metadata";

View File

@ -139,7 +139,7 @@ index efc640d13148..023659daac0e 100644
@@ -26,38 +26,16 @@ @@ -26,38 +26,16 @@
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "string_table.h" #include "string-table.h"
- -
+#include "cmds-fi-disk_usage.h" +#include "cmds-fi-disk_usage.h"
#include "commands.h" #include "commands.h"

View File

@ -13,7 +13,7 @@ the next line.
Sample: Sample:
/dev/sda7, ID: 3 /dev/sda7, ID: 3
Device size: 10.00GiB Device size: 10.00GiB
FS occuppied: 5.00GiB FS occupied: 5.00GiB
Data,RAID10: 512.00MiB Data,RAID10: 512.00MiB
Metadata,RAID10: 512.00MiB Metadata,RAID10: 512.00MiB
System,RAID10: 4.00MiB System,RAID10: 4.00MiB
@ -57,7 +57,7 @@ index 8c0462230510..63ed9ba089d5 100644
++ndevs; ++ndevs;
} }
@@ -879,5 +880,15 @@ void print_device_chunks(int fd, u64 devid, u64 total_size, @@ -879,5 +880,14 @@ void print_device_chunks(int fd, u64 devid, u64 total_size,
printf(" Unallocated: %*s%10s\n", printf(" Unallocated: %*s%10s\n",
(int)(20 - strlen("Unallocated")), "", (int)(20 - strlen("Unallocated")), "",
df_pretty_sizes(total_size - allocated, mode)); df_pretty_sizes(total_size - allocated, mode));
@ -68,10 +68,9 @@ index 8c0462230510..63ed9ba089d5 100644
+ printf(" Device size: %*s%10s\n", + printf(" Device size: %*s%10s\n",
+ (int)(20 - strlen("Device size")), "", + (int)(20 - strlen("Device size")), "",
+ df_pretty_sizes(devinfo->device_size, mode)); + df_pretty_sizes(devinfo->device_size, mode));
+ printf(" FS occuppied:%*s%10s\n", + printf(" FS occupied: %*s%10s\n",
+ (int)(20 - strlen("FS occupied")), "", + (int)(20 - strlen("FS occupied")), "",
+ df_pretty_sizes(devinfo->size, mode)); + df_pretty_sizes(devinfo->size, mode));
+ }
} }
diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h
index 787b4eb56acf..79cc2a115bc5 100644 index 787b4eb56acf..79cc2a115bc5 100644

View File

@ -72,12 +72,6 @@ index 63ed9ba089d5..0e93dc836f16 100644
} }
void print_device_sizes(int fd, struct device_info *devinfo, int mode) void print_device_sizes(int fd, struct device_info *devinfo, int mode)
@@ -890,5 +890,4 @@ void print_device_sizes(int fd, struct device_info *devinfo, int mode)
printf(" FS occuppied:%*s%10s\n",
(int)(20 - strlen("FS occupied")), "",
df_pretty_sizes(devinfo->size, mode));
- }
}
diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h
index 79cc2a115bc5..dbc2a10f31eb 100644 index 79cc2a115bc5..dbc2a10f31eb 100644
--- a/cmds-fi-disk_usage.h --- a/cmds-fi-disk_usage.h

View File

@ -62,23 +62,10 @@ Index: btrfs-progs-v3.16/utils.c
+ int base = 0; + int base = 0;
+ const char const **suffix = NULL; + const char const **suffix = NULL;
+ u64 last_size; + u64 last_size;
+
+ if (str_size == 0)
+ return 0;
- if (str_bytes == 0) - if (str_bytes == 0)
+ if (unit_mode == UNITS_RAW) { + if (str_size == 0)
+ snprintf(str, str_size, "%llu", size);
return 0; return 0;
+ }
+
+ if (unit_mode == UNITS_BINARY) {
+ base = 1024;
+ suffix = unit_suffix_binary;
+ } else if (unit_mode == UNITS_DECIMAL) {
+ base = 1000;
+ suffix = unit_suffix_decimal;
+ }
- if( size < 1024 ){ - if( size < 1024 ){
- fraction = size; - fraction = size;
@ -91,21 +78,33 @@ Index: btrfs-progs-v3.16/utils.c
- size /= 1024; - size /= 1024;
- num_divs ++; - num_divs ++;
- } - }
- + if (unit_mode == UNITS_RAW) {
+ snprintf(str, str_size, "%llu", size);
+ return 0;
+ }
- if (num_divs >= ARRAY_SIZE(size_strs)) { - if (num_divs >= ARRAY_SIZE(size_strs)) {
- str[0] = '\0'; - str[0] = '\0';
- return -1; - return -1;
- } - }
- fraction = (float)last_size / 1024; - fraction = (float)last_size / 1024;
+ if (unit_mode == UNITS_BINARY) {
+ base = 1024;
+ suffix = unit_suffix_binary;
+ } else if (unit_mode == UNITS_DECIMAL) {
+ base = 1000;
+ suffix = unit_suffix_decimal;
}
- return snprintf(str, str_bytes, "%.2f%s", fraction,
- size_strs[num_divs]);
+
+ /* Unknown mode */ + /* Unknown mode */
+ if (!base) { + if (!base) {
+ fprintf(stderr, "INTERNAL ERROR: unknown unit base, mode %d", + fprintf(stderr, "INTERNAL ERROR: unknown unit base, mode %d",
+ unit_mode); + unit_mode);
+ assert(0); + assert(0);
+ return -1; + return -1;
} + }
- return snprintf(str, str_bytes, "%.2f%s", fraction,
- size_strs[num_divs]);
+ +
+ num_divs = 0; + num_divs = 0;
+ last_size = size; + last_size = size;

View File

@ -232,7 +232,7 @@ index 1e412c0b0e69..d1b8bbddc4d5 100644
(int)(20 - strlen("Device size")), "", (int)(20 - strlen("Device size")), "",
- df_pretty_sizes(devinfo->device_size, mode)); - df_pretty_sizes(devinfo->device_size, mode));
+ pretty_size_mode(devinfo->device_size, mode)); + pretty_size_mode(devinfo->device_size, mode));
printf(" FS occuppied:%*s%10s\n", printf(" FS occupied: %*s%10s\n",
(int)(20 - strlen("FS occupied")), "", (int)(20 - strlen("FS occupied")), "",
- df_pretty_sizes(devinfo->size, mode)); - df_pretty_sizes(devinfo->size, mode));
+ pretty_size_mode(devinfo->size, mode)); + pretty_size_mode(devinfo->size, mode));

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2bd9bebf6a9b55124bf5c0476456f73cf03c19680044097d8f22431d7931820d
size 388182

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd4f31715ef3767f5061655ed1c7c5a4ca808f9aa331627874dad666017eae57
size 387600

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Mon Sep 22 23:01:01 CEST 2014 - dsterba@suse.cz
- version 3.16.1
- library version defines
- subvol list: -R to print received UUID
- fixed detection of multiple mounts on the same directory
- restore: misc fixes
- other fixes
- Modified patches (sync with pending upstream versions):
* 0011-btrfs-progs-Enhance-the-command-btrfs-filesystem-df.patch
* 0012-btrfs-progs-Add-helpers-functions-to-handle-the-prin.patch
* 0013-btrfs-progs-Add-command-btrfs-filesystem-disk-usage.patch
* 0018-btrfs-progs-read-global-reserve-size-from-space-info.patch
* 0020-btrfs-progs-move-device-usage-to-cmds-device-more-cl.patch
* 0024-btrfs-progs-Print-more-info-about-device-sizes.patch
* 0025-btrfs-progs-compare-unallocated-space-against-the-co.patch
* 0028-btrfs-progs-extend-pretty-printers-with-unit-mode.patch
* 0029-btrfs-progs-replace-df_pretty_sizes-with-pretty_size.patch
- Removed patch: library-version-defines.patch (upstream)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 5 15:02:39 CEST 2014 - dsterba@suse.cz Fri Sep 5 15:02:39 CEST 2014 - dsterba@suse.cz

View File

@ -16,17 +16,17 @@
# #
%define tar_version v3.16 %define tar_version v3.16.1
Name: btrfsprogs Name: btrfsprogs
Version: 3.16 Version: 3.16.1
Release: 0 Release: 0
Summary: Utilities for the Btrfs filesystem Summary: Utilities for the Btrfs filesystem
License: GPL-2.0 License: GPL-2.0
Group: System/Filesystems Group: System/Filesystems
Url: http://btrfs.wiki.kernel.org/index.php/Main_Page Url: http://btrfs.wiki.kernel.org/index.php/Main_Page
#Git-Web: http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git #Git-Web: http://git.kernel.org/cgit/linux/kernel/git/kdave/btrfs-progs.git
#Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs #Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs
Source: https://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-%{tar_version}.tar.gz Source: https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-%{tar_version}.tar.gz
Source1: boot-btrfs.sh Source1: boot-btrfs.sh
Source4: setup-btrfs.sh Source4: setup-btrfs.sh
@ -63,7 +63,6 @@ Patch169: 0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch
Patch171: 0171-btrfs-progs-make-free-space-checker-work-on-non-4k-s.patch Patch171: 0171-btrfs-progs-make-free-space-checker-work-on-non-4k-s.patch
Patch1000: local-version-override.patch Patch1000: local-version-override.patch
Patch1001: library-version-defines.patch
BuildRequires: asciidoc BuildRequires: asciidoc
BuildRequires: libacl-devel BuildRequires: libacl-devel
@ -132,7 +131,6 @@ build applications to interface with btrfs.
%patch169 -p1 %patch169 -p1
%patch171 -p1 %patch171 -p1
%patch1000 -p1 %patch1000 -p1
%patch1001 -p1
%build %build
make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \ make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \

View File

@ -1,90 +0,0 @@
From f412157fd429eab3d309602de214639a8c8c584e Mon Sep 17 00:00:00 2001
From: Arvin Schnell <aschnell@suse.de>
Date: Mon, 3 Jun 2013 14:31:41 +0200
Subject: [PATCH] btrfs-progs: library version defines
commit 46de1a6ec3dbb0db203baa6c46cb64ba9b000ea2 changed the
parameters of btrfs_read_and_process_send_stream(). This breaks
snapper compilation. We can include version defines usable for the C
preprocessor.
Version 0.1.0: API up to and including 46de1a6ec3dbb0db2 (3.14.x)
Version 0.1.1: 909131939f750faffb9fab (changed in 3.16)
Signed-off-by: Arvin Schnell <aschnell@suse.de>
Signed-off-by: David Sterba <dsterba@suse.cz>
---
Makefile | 2 +-
send-stream.h | 5 +++++
version.sh | 17 ++++++++++++++++-
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index e721e99c8319..73ef386896bf 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o \
uuid-tree.o utils-lib.o
libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \
- extent_io.h ioctl.h ctree.h btrfsck.h
+ extent_io.h ioctl.h ctree.h btrfsck.h version.h
TESTS = fsck-tests.sh convert-tests.sh
INSTALL = install
diff --git a/send-stream.h b/send-stream.h
index 293bf6af3659..bedff4d0422c 100644
--- a/send-stream.h
+++ b/send-stream.h
@@ -18,6 +18,11 @@
#ifndef SEND_STREAM_H_
#define SEND_STREAM_H_
+/*
+ * NOTE: this file is public API, any incompatible change has to update
+ * library version
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/version.sh b/version.sh
index 90000019fe1d..2e4a8d9e1303 100644
--- a/version.sh
+++ b/version.sh
@@ -8,6 +8,10 @@
v="v3.16"
+lib_major=0
+lib_minor=1
+lib_patchlevel=1
+
which git &> /dev/null
if [ $? == 0 -a -d .git ]; then
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
@@ -24,8 +28,19 @@ if [ $? == 0 -a -d .git ]; then
fi
fi
-echo "#ifndef __BUILD_VERSION" > .build-version.h
+echo "/* NOTE: this file is autogenerated by version.sh, do not edit */" > .build-version.h
+echo "#ifndef __BUILD_VERSION" >> .build-version.h
+echo >> .build-version.h
echo "#define __BUILD_VERSION" >> .build-version.h
+echo >> .build-version.h
+echo "#define BTRFS_LIB_MAJOR $lib_major" >> .build-version.h
+echo "#define BTRFS_LIB_MINOR $lib_minor" >> .build-version.h
+echo "#define BTRFS_LIB_PATCHLEVEL $lib_patchlevel" >> .build-version.h
+echo >> .build-version.h
+echo "#define BTRFS_LIB_VERSION ( BTRFS_LIB_MAJOR * 10000 + \\" >> .build-version.h
+echo " BTRFS_LIB_MINOR * 100 + \\" >> .build-version.h
+echo " BTRFS_LIB_PATCHLEVEL )" >> .build-version.h
+echo >> .build-version.h
echo "#define BTRFS_BUILD_VERSION \"Btrfs $v\"" >> .build-version.h
echo "#endif" >> .build-version.h
--
1.9.0

View File

@ -1,13 +1,13 @@
Index: btrfs-progs-v0.19-116-g13eced9/version.sh Index: btrfs-progs-v3.16.1/version.sh
=================================================================== ===================================================================
--- btrfs-progs-v0.19-116-g13eced9.orig/version.sh --- btrfs-progs-v3.16.1.orig/version.sh
+++ btrfs-progs-v0.19-116-g13eced9/version.sh +++ btrfs-progs-v3.16.1/version.sh
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
# Copyright 2008, Oracle # Copyright 2008, Oracle
# Released under the GNU GPLv2 # Released under the GNU GPLv2
-v="v3.16" -v="v3.16.1"
+v="v3.16" +v="v3.16.1+20140922"
which git &> /dev/null lib_major=0
if [ $? == 0 -a -d .git ]; then lib_minor=1