- rebuild F7 package to F8
This commit is contained in:
parent
7c423cb1a8
commit
e87645308f
12 changed files with 460 additions and 9 deletions
36
util-linux-2.13-blockdev-errno.patch
Normal file
36
util-linux-2.13-blockdev-errno.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
commit 3281d4268a192cbd1951347a4a857b94428dc958
|
||||
Author: Karel Zak <kzak@redhat.com>
|
||||
Date: Wed Aug 1 15:06:18 2007 +0200
|
||||
|
||||
blockdev: fix "blockdev --getsz" for large devices
|
||||
|
||||
The "blockdev --getsz" command doesn't try to use BLKGETSIZE64 when
|
||||
previous BLKGETSIZE failed with EFBIG. This patch fixes this problem.
|
||||
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
|
||||
diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c
|
||||
index 46b7fa7..0dd531c 100644
|
||||
--- a/disk-utils/blockdev.c
|
||||
+++ b/disk-utils/blockdev.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#include "nls.h"
|
||||
|
||||
@@ -148,8 +149,10 @@ getsize(int fd, long long *sectors) {
|
||||
long long b;
|
||||
|
||||
err = ioctl (fd, BLKGETSIZE, &sz);
|
||||
- if (err)
|
||||
- return err;
|
||||
+ if (err) {
|
||||
+ if (errno != EFBIG)
|
||||
+ return err;
|
||||
+ }
|
||||
err = ioctl(fd, BLKGETSIZE64, &b);
|
||||
if (err || b == 0 || b == sz)
|
||||
*sectors = sz;
|
||||
Loading…
Add table
Add a link
Reference in a new issue