projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07fa0f9
)
installer: fix use of FIEMAP
author
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 16 Jun 2010 00:24:32 +0000
(17:24 -0700)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 16 Jun 2010 00:24:32 +0000
(17:24 -0700)
Correct the implementation of block mapping using FIEMAP (as opposed
to FIBMAP).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
libinstaller/syslxcom.c
patch
|
blob
|
history
diff --git
a/libinstaller/syslxcom.c
b/libinstaller/syslxcom.c
index
013b69a
..
85b3f6e
100644
(file)
--- a/
libinstaller/syslxcom.c
+++ b/
libinstaller/syslxcom.c
@@
-209,7
+209,7
@@
static int sectmap_fie(int fd, sector_t *sectors, int nsectors)
fm->fm_flags = FIEMAP_FLAG_SYNC;
fm->fm_extent_count = nsectors;
- if (ioctl(fd, FS_IOC_FIEMAP,
&
fm))
+ if (ioctl(fd, FS_IOC_FIEMAP, fm))
return -1;
memset(sectors, 0, nsectors * sizeof *sectors);
@@
-225,7
+225,7
@@
static int sectmap_fie(int fd, sector_t *sectors, int nsectors)
if (fe->fe_flags & FIEMAP_EXTENT_LAST) {
/* If this is the *final* extent, pad the length */
fe->fe_length = (fe->fe_length + SECTOR_SIZE - 1)
- & (SECTOR_SIZE - 1);
+ &
~
(SECTOR_SIZE - 1);
}
if ((fe->fe_logical | fe->fe_physical| fe->fe_length) &