search for: ocfs_magic

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

Did you mean: nsfs_magic
2004 Feb 04
3
[PATCH] Adding ocfs support to blkid
...blkid_magic *id __BLKID_ATTR((unused)), + unsigned char *buf) +{ + struct ocfs_volume_header ovh; + struct ocfs_volume_label ovl; + + if (lseek(fd, 0, SEEK_SET) != 0) + return -1; + + if (read(fd, (char *) &ovh, sizeof(ovh)) != sizeof(ovh)) + return -1; + + if (strncmp(ovh.signature, OCFS_MAGIC, sizeof(OCFS_MAGIC)) != 0) + return -1; + + if (lseek(fd, 512, SEEK_SET) != 512) + return -1; + + if (read(fd, (char *) &ovl, sizeof(ovl)) != sizeof(ovl)) + return -1; + + blkid_set_tag(dev, "LABEL", ovl.label, ocfslabellen(ovl)); + blkid_set_tag(dev, "MOUNT", ovh.mount,...