Skip to content

Commit

Permalink
[libblockdev] Upgrade to 2.19. Contributes to JB#42802
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Sep 18, 2018
1 parent 3b67a93 commit 6700bbe
Show file tree
Hide file tree
Showing 6 changed files with 641 additions and 74 deletions.
2 changes: 1 addition & 1 deletion libblockdev
Submodule libblockdev updated 112 files
6 changes: 3 additions & 3 deletions rpm/0001-Fix-acinclude-mktemp.patch
@@ -1,4 +1,4 @@
From 1556bb275f87f7860511b8cd81a53c77265c8fad Mon Sep 17 00:00:00 2001
From 56a774cf07b292703e239fc44c537438781e6134 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 28 Nov 2017 15:32:52 +0200
Subject: [PATCH 1/4] Fix acinclude mktemp
Expand All @@ -9,7 +9,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 5c54d4a..df638f3 100644
index 264fae0..0336ec8 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -65,7 +65,7 @@ dnl file that just includes the HEADER using the given CFLAGS. In case of
Expand All @@ -22,5 +22,5 @@ index 5c54d4a..df638f3 100644
${CC} -c [$2] $temp_file
status=$?
--
2.7.4
2.17.1

4 changes: 2 additions & 2 deletions rpm/0002-Drop-Python.patch
@@ -1,4 +1,4 @@
From f8063c58688051c51e3173a8e6f58805ee2c985b Mon Sep 17 00:00:00 2001
From c38dcf190c548e5e133112f20d8fbba4ac46dfbc Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 28 Nov 2017 15:33:09 +0200
Subject: [PATCH 2/4] Drop Python
Expand All @@ -18,5 +18,5 @@ index 3e18de0..cb850a9 100644

MAINTAINERCLEANFILES = Makefile.in
--
2.7.4
2.17.1

40 changes: 18 additions & 22 deletions rpm/0003-Make-vfat-resizing-optional.patch
@@ -1,40 +1,38 @@
From 046ac6848e0c2c5fcab4eaa596630d523d0f5c20 Mon Sep 17 00:00:00 2001
From 56778cd762cf8f58c651578937964413b4299f50 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Thu, 7 Dec 2017 10:53:04 +0200
Date: Fri, 3 Aug 2018 12:51:25 +0300
Subject: [PATCH 3/4] Make vfat resizing optional

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
src/plugins/fs.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
src/plugins/fs/vfat.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/src/plugins/fs.c b/src/plugins/fs.c
index 48faa07..6b03d62 100644
--- a/src/plugins/fs.c
+++ b/src/plugins/fs.c
@@ -18,8 +18,12 @@
diff --git a/src/plugins/fs/vfat.c b/src/plugins/fs/vfat.c
index 6759855..f47cd72 100644
--- a/src/plugins/fs/vfat.c
+++ b/src/plugins/fs/vfat.c
@@ -17,6 +17,11 @@
* Author: Vratislav Podzimek <vpodzime@redhat.com>
*/

#define _GNU_SOURCE
-#include <unistd.h>

+#ifndef ENABLE_VFAT_RESIZE
+#define ENABLE_VFAT_RESIZE 0
+#endif
+
+#include <unistd.h>
+#include <stdio.h>
#include <blockdev/utils.h>
#include <fcntl.h>
#include <string.h>
@@ -2954,6 +2958,7 @@ BDFSVfatInfo* bd_fs_vfat_get_info (const gchar *device, GError **error) {
#include <blockdev/part_err.h>
#include <check_deps.h>
@@ -387,6 +392,7 @@ BDFSVfatInfo* bd_fs_vfat_get_info (const gchar *device, GError **error) {
* Tech category: %BD_FS_TECH_VFAT-%BD_FS_TECH_MODE_RESIZE
*/
gboolean bd_fs_vfat_resize (const gchar *device, guint64 new_size, GError **error) {
+#if ENABLE_VFAT_RESIZE
PedDevice *ped_dev = NULL;
PedGeometry geom = {0};
PedGeometry new_geom = {0};
@@ -3032,7 +3037,20 @@ gboolean bd_fs_vfat_resize (const gchar *device, guint64 new_size, GError **erro
PedGeometry geom = ZERO_INIT;
PedGeometry new_geom = ZERO_INIT;
@@ -465,5 +471,18 @@ gboolean bd_fs_vfat_resize (const gchar *device, guint64 new_size, GError **erro
bd_utils_report_finished (progress_id, "Completed");

return TRUE;
Expand All @@ -53,8 +51,6 @@ index 48faa07..6b03d62 100644
+ return FALSE;
+#endif
}

/**
--
2.7.4
2.17.1

0 comments on commit 6700bbe

Please sign in to comment.