ufs.c (67350cb56a69468c118bd4ccf6e361b7ebfa9eb4) ufs.c (34816cb9aeca7b0ad3289c2de04cad0cd1b111ed)
1/*-
2 * Copyright (c) 2002, 2003 Gordon Tetlow
3 * Copyright (c) 2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
4 * Copyright (c) 2014 The FreeBSD Foundation
5 * All rights reserved.
6 *
7 * This software was developed by Edward Tomasz Napierala under sponsorship
8 * from the FreeBSD Foundation.

--- 39 unchanged lines hidden (view full) ---

48int
49fstyp_ufs(FILE *fp, char *label, size_t labelsize)
50{
51 struct fs *fs;
52
53 switch (sbget(fileno(fp), &fs, STDSB)) {
54 case 0:
55 strlcpy(label, fs->fs_volname, labelsize);
1/*-
2 * Copyright (c) 2002, 2003 Gordon Tetlow
3 * Copyright (c) 2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
4 * Copyright (c) 2014 The FreeBSD Foundation
5 * All rights reserved.
6 *
7 * This software was developed by Edward Tomasz Napierala under sponsorship
8 * from the FreeBSD Foundation.

--- 39 unchanged lines hidden (view full) ---

48int
49fstyp_ufs(FILE *fp, char *label, size_t labelsize)
50{
51 struct fs *fs;
52
53 switch (sbget(fileno(fp), &fs, STDSB)) {
54 case 0:
55 strlcpy(label, fs->fs_volname, labelsize);
56 free(fs->fs_csp);
57 free(fs->fs_si);
58 free(fs);
56 return (0);
57 case ENOENT:
58 /* Cannot find file system superblock */
59 return (1);
60 default:
61 /* Unable to read file system superblock */
62 return (1);
63 }
64}
59 return (0);
60 case ENOENT:
61 /* Cannot find file system superblock */
62 return (1);
63 default:
64 /* Unable to read file system superblock */
65 return (1);
66 }
67}