diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2005-11-30 19:24:51 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2005-11-30 19:24:51 +0000 |
commit | 8a4a44b5aa46c9d035ba939da61881d622ad5f12 (patch) | |
tree | 81ef73354089000f24e964c7cdffc0035dfe7d01 /sys/geom/geom_vol_ffs.c | |
parent | 6dfb88de8310b3b4d9c61fcbd9428a01ad24cd29 (diff) | |
download | src-8a4a44b5aa46c9d035ba939da61881d622ad5f12.tar.gz src-8a4a44b5aa46c9d035ba939da61881d622ad5f12.zip |
Check for g_read_data(9) errors properly:
o The only indication of error condition is NULL value returned by
the function;
o value pointed to by error argument is undefined in the case when
operation completes successfully.
Discussed with: phk
Notes
Notes:
svn path=/head/; revision=152967
Diffstat (limited to 'sys/geom/geom_vol_ffs.c')
-rw-r--r-- | sys/geom/geom_vol_ffs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_vol_ffs.c b/sys/geom/geom_vol_ffs.c index d90222f7f6e7..f6fd88eb6cb1 100644 --- a/sys/geom/geom_vol_ffs.c +++ b/sys/geom/geom_vol_ffs.c @@ -100,7 +100,7 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider *pp, int flags) fs = (struct fs *) g_read_data(cp, superblock, SBLOCKSIZE, &error); - if (fs == NULL || error != 0) + if (fs == NULL) continue; /* Check for magic and make sure things are the right size */ if (fs->fs_magic == FS_UFS1_MAGIC) { |