Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/label/g_label_reiserfs.c
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
static reiserfs_sb_t * | static reiserfs_sb_t * | ||||
g_label_reiserfs_read_super(struct g_consumer *cp, off_t offset) | g_label_reiserfs_read_super(struct g_consumer *cp, off_t offset) | ||||
{ | { | ||||
reiserfs_sb_t *fs; | reiserfs_sb_t *fs; | ||||
u_int secsize; | u_int secsize; | ||||
secsize = cp->provider->sectorsize; | secsize = cp->provider->sectorsize; | ||||
if ((offset % secsize) != 0) | |||||
return (NULL); | |||||
if (secsize < sizeof(*fs)) | if (secsize < sizeof(*fs)) | ||||
return (NULL); | |||||
if ((offset % secsize) != 0) | |||||
return (NULL); | return (NULL); | ||||
fs = g_read_data(cp, offset, secsize, NULL); | fs = g_read_data(cp, offset, secsize, NULL); | ||||
if (fs == NULL) | if (fs == NULL) | ||||
return (NULL); | return (NULL); | ||||
if (strncmp(fs->s_magic, REISERFS_SUPER_MAGIC, | if (strncmp(fs->s_magic, REISERFS_SUPER_MAGIC, | ||||
strlen(REISERFS_SUPER_MAGIC)) != 0) { | strlen(REISERFS_SUPER_MAGIC)) != 0) { | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |