On Sun, 04 Sep 2005 10:31:02 +1000, Greg Schafer wrote:
> Jürg Billeter wrote:
>
>> The patch speaks for itself,
>
> BTW, changing the problematic line to:
>
> && read(fd, &reiserfsb, sizeof(reiserfsb)) == sizeof(reiserfsb)
>
> seems to also fix the problem. It's simpler and is more in line with the
> other filesystem checks in that function. Maybe the above variant is more
> correct? Thoughts?
>
> Regards
> Greg
Checked out util-linux-2.13pre3 today and this is what it has:
/* reiserfs? */
offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE
+ REISERFS_DISK_OFFSET_IN_BYTES;
if (ext2_llseek(fd, offset, SEEK_SET) == offset
&& read(fd, &reiserfsb, sizeof(reiserfsb)) == sizeof(reiserfsb)
&& has_reiserfs_magic_string(&reiserfsb, &reiserfs_is_3_6)) {
if (reiserfs_is_3_6) {
/* label only on version 3.6 onward */
label = reiserfsb.s_label;
for(j=0; j<REISERFSLABELSZ && j<LABELSZ &&
isprint(label[j]); j++)
p_info[i].volume_label[j] = label[j];
p_info[i].volume_label[j] = 0;
}
strncpy(p_info[i].fstype, "reiserfs", FSTYPESZ);
return;
}
Works fine out of the box.
Sincerely,
William Harrington
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page