search for: inc_and_align

Displaying 1 result from an estimated 1 matches for "inc_and_align".

2012 Aug 02
0
[PATCH 2/3] ALPHA: first try to fix adv problem
...?? for (i = 0; i < nsect - 2; i++) *sp++ = BTRFS_EXTLINUX_OFFSET/SECTOR_SIZE + i; for (i = 0; i < 2; i++) @@ -410,12 +412,33 @@ int install_bootblock(int fd, const char *device) return 0; } -int ext2_fat_install_file(const char *path, int devfd, struct stat *rst) +static int inc_and_align(int fd, unsigned *pos, unsigned bytes, unsigned align) +{ + char buf[512]; + unsigned left; + + *pos += bytes; + left = *pos % align; + left = (align - left) % align; + while (left > 0) { + unsigned l = left > sizeof(buf) ? sizeof(buf) : left; + memset(buf, 0, sizeof(buf));...