Lines 1835-1843
Link Here
|
1835 |
#ifdef GRUB_UTIL |
1835 |
#ifdef GRUB_UTIL |
1836 |
else if (grub_memcmp ("--stage2=", arg, sizeof ("--stage2=") - 1) == 0) |
1836 |
else if (grub_memcmp ("--stage2=", arg, sizeof ("--stage2=") - 1) == 0) |
1837 |
{ |
1837 |
{ |
|
|
1838 |
int fd; |
1838 |
stage2_os_file = arg + sizeof ("--stage2=") - 1; |
1839 |
stage2_os_file = arg + sizeof ("--stage2=") - 1; |
1839 |
arg = skip_to (0, arg); |
1840 |
arg = skip_to (0, arg); |
1840 |
nul_terminate (stage2_os_file); |
1841 |
nul_terminate (stage2_os_file); |
|
|
1842 |
|
1843 |
#if defined(__linux__) && defined (FSYS_REISERFS) |
1844 |
if ((fd=open(stage2_os_file, O_RDONLY)) >= 0) |
1845 |
{ |
1846 |
struct statfs buf; |
1847 |
/* see if the file sits on a reiserfs, |
1848 |
and try do defragment it if so. */ |
1849 |
fstatfs(fd, &buf); |
1850 |
if (buf.f_type == REISERFS_SUPER_MAGIC) |
1851 |
ioctl (fd, REISERFS_IOC_UNPACK, 1); |
1852 |
} |
1853 |
#endif /* __linux__ && FSYS_REISERFS */ |
1854 |
|
1841 |
} |
1855 |
} |
1842 |
#endif /* GRUB_UTIL */ |
1856 |
#endif /* GRUB_UTIL */ |
1843 |
else |
1857 |
else |