g_label.c (244585) | g_label.c (249508) |
---|---|
1/*- 2 * Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/geom/label/g_label.c 244585 2012-12-22 13:43:12Z jh $"); | 28__FBSDID("$FreeBSD: head/sys/geom/label/g_label.c 249508 2013-04-15 16:09:24Z ivoras $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/lock.h> 35#include <sys/mutex.h> 36#include <sys/bio.h> --- 47 unchanged lines hidden (view full) --- 84 &g_label_ufs_volume, 85 &g_label_iso9660, 86 &g_label_msdosfs, 87 &g_label_ext2fs, 88 &g_label_reiserfs, 89 &g_label_ntfs, 90 &g_label_gpt, 91 &g_label_gpt_uuid, | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/lock.h> 35#include <sys/mutex.h> 36#include <sys/bio.h> --- 47 unchanged lines hidden (view full) --- 84 &g_label_ufs_volume, 85 &g_label_iso9660, 86 &g_label_msdosfs, 87 &g_label_ext2fs, 88 &g_label_reiserfs, 89 &g_label_ntfs, 90 &g_label_gpt, 91 &g_label_gpt_uuid, |
92 &g_label_disk_ident, |
|
92 NULL 93}; 94 95 96static int 97g_label_destroy_geom(struct gctl_req *req __unused, struct g_class *mp, 98 struct g_geom *gp __unused) 99{ --- 234 unchanged lines hidden (view full) --- 334 335 if (md.md_provsize != pp->mediasize) 336 break; 337 338 g_label_create(NULL, mp, pp, md.md_label, G_LABEL_DIR, 339 pp->mediasize - pp->sectorsize); 340 } while (0); 341 for (i = 0; g_labels[i] != NULL; i++) { | 93 NULL 94}; 95 96 97static int 98g_label_destroy_geom(struct gctl_req *req __unused, struct g_class *mp, 99 struct g_geom *gp __unused) 100{ --- 234 unchanged lines hidden (view full) --- 335 336 if (md.md_provsize != pp->mediasize) 337 break; 338 339 g_label_create(NULL, mp, pp, md.md_label, G_LABEL_DIR, 340 pp->mediasize - pp->sectorsize); 341 } while (0); 342 for (i = 0; g_labels[i] != NULL; i++) { |
342 char label[64]; | 343 char label[128]; |
343 344 if (g_labels[i]->ld_enabled == 0) 345 continue; 346 g_topology_unlock(); 347 g_labels[i]->ld_taste(cp, label, sizeof(label)); 348 g_label_mangle_name(label, sizeof(label)); 349 g_topology_lock(); 350 if (label[0] == '\0') --- 171 unchanged lines hidden --- | 344 345 if (g_labels[i]->ld_enabled == 0) 346 continue; 347 g_topology_unlock(); 348 g_labels[i]->ld_taste(cp, label, sizeof(label)); 349 g_label_mangle_name(label, sizeof(label)); 350 g_topology_lock(); 351 if (label[0] == '\0') --- 171 unchanged lines hidden --- |