diff options
Diffstat (limited to 'e2fsprogs/ext2fs/imager.c')
-rw-r--r-- | e2fsprogs/ext2fs/imager.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/e2fsprogs/ext2fs/imager.c b/e2fsprogs/ext2fs/imager.c index 3f2826b82..00eb71723 100644 --- a/e2fsprogs/ext2fs/imager.c +++ b/e2fsprogs/ext2fs/imager.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * image.c --- writes out the critical parts of the filesystem as a | 2 | * image.c --- writes out the critical parts of the filesystem as a |
3 | * flat file. | 3 | * flat file. |
4 | * | 4 | * |
5 | * Copyright (C) 2000 Theodore Ts'o. | 5 | * Copyright (C) 2000 Theodore Ts'o. |
6 | * | 6 | * |
7 | * Note: this uses the POSIX IO interfaces, unlike most of the other | 7 | * Note: this uses the POSIX IO interfaces, unlike most of the other |
8 | * functions in this library. So sue me. | 8 | * functions in this library. So sue me. |
9 | * | 9 | * |
10 | * %Begin-Header% | 10 | * %Begin-Header% |
11 | * This file may be redistributed under the terms of the GNU Public | 11 | * This file may be redistributed under the terms of the GNU Public |
@@ -67,7 +67,7 @@ errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags) | |||
67 | errcode_t retval; | 67 | errcode_t retval; |
68 | 68 | ||
69 | buf = xmalloc(fs->blocksize * BUF_BLOCKS); | 69 | buf = xmalloc(fs->blocksize * BUF_BLOCKS); |
70 | 70 | ||
71 | for (group = 0; group < fs->group_desc_count; group++) { | 71 | for (group = 0; group < fs->group_desc_count; group++) { |
72 | blk = fs->group_desc[(unsigned)group].bg_inode_table; | 72 | blk = fs->group_desc[(unsigned)group].bg_inode_table; |
73 | if (!blk) | 73 | if (!blk) |
@@ -127,7 +127,7 @@ errout: | |||
127 | /* | 127 | /* |
128 | * Read in the inode table and stuff it into place | 128 | * Read in the inode table and stuff it into place |
129 | */ | 129 | */ |
130 | errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, | 130 | errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, |
131 | int flags EXT2FS_ATTR((unused))) | 131 | int flags EXT2FS_ATTR((unused))) |
132 | { | 132 | { |
133 | unsigned int group, c, left; | 133 | unsigned int group, c, left; |
@@ -137,7 +137,7 @@ errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, | |||
137 | errcode_t retval; | 137 | errcode_t retval; |
138 | 138 | ||
139 | buf = xmalloc(fs->blocksize * BUF_BLOCKS); | 139 | buf = xmalloc(fs->blocksize * BUF_BLOCKS); |
140 | 140 | ||
141 | for (group = 0; group < fs->group_desc_count; group++) { | 141 | for (group = 0; group < fs->group_desc_count; group++) { |
142 | blk = fs->group_desc[(unsigned)group].bg_inode_table; | 142 | blk = fs->group_desc[(unsigned)group].bg_inode_table; |
143 | if (!blk) { | 143 | if (!blk) { |
@@ -161,7 +161,7 @@ errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, | |||
161 | retval = io_channel_write_blk(fs->io, blk, c, buf); | 161 | retval = io_channel_write_blk(fs->io, blk, c, buf); |
162 | if (retval) | 162 | if (retval) |
163 | goto errout; | 163 | goto errout; |
164 | 164 | ||
165 | blk += c; | 165 | blk += c; |
166 | left -= c; | 166 | left -= c; |
167 | } | 167 | } |
@@ -176,7 +176,7 @@ errout: | |||
176 | /* | 176 | /* |
177 | * Write out superblock and group descriptors | 177 | * Write out superblock and group descriptors |
178 | */ | 178 | */ |
179 | errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, | 179 | errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, |
180 | int flags EXT2FS_ATTR((unused))) | 180 | int flags EXT2FS_ATTR((unused))) |
181 | { | 181 | { |
182 | char *buf, *cp; | 182 | char *buf, *cp; |
@@ -213,7 +213,7 @@ errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, | |||
213 | retval = EXT2_ET_SHORT_WRITE; | 213 | retval = EXT2_ET_SHORT_WRITE; |
214 | goto errout; | 214 | goto errout; |
215 | } | 215 | } |
216 | 216 | ||
217 | retval = 0; | 217 | retval = 0; |
218 | 218 | ||
219 | errout: | 219 | errout: |
@@ -224,7 +224,7 @@ errout: | |||
224 | /* | 224 | /* |
225 | * Read the superblock and group descriptors and overwrite them. | 225 | * Read the superblock and group descriptors and overwrite them. |
226 | */ | 226 | */ |
227 | errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd, | 227 | errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd, |
228 | int flags EXT2FS_ATTR((unused))) | 228 | int flags EXT2FS_ATTR((unused))) |
229 | { | 229 | { |
230 | char *buf; | 230 | char *buf; |
@@ -368,7 +368,7 @@ errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags) | |||
368 | goto errout; | 368 | goto errout; |
369 | } | 369 | } |
370 | memcpy(ptr, buf, size); | 370 | memcpy(ptr, buf, size); |
371 | 371 | ||
372 | retval = 0; | 372 | retval = 0; |
373 | errout: | 373 | errout: |
374 | if (buf) | 374 | if (buf) |