geom_ccd.c (684adedee4ab2600d43e366dc3cbd9bfa28486fb) | geom_ccd.c (49ff4debd3d4c155448b2b4e3b95b17d9eb575ed) |
---|---|
1/* $Id: ccd.c,v 1.50 1999/07/17 19:58:37 phk Exp $ */ | 1/* $Id: ccd.c,v 1.51 1999/07/18 14:30:57 phk Exp $ */ |
2 3/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ 4 5/* 6 * Copyright (c) 1995 Jason R. Thorpe. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 1250 unchanged lines hidden (view full) --- 1260 1261 cs->sc_flags |= CCDF_LABELLING; 1262 1263 error = setdisklabel(&cs->sc_label, 1264 (struct disklabel *)data, 0); 1265 if (error == 0) { 1266 if (cmd == DIOCWDINFO) 1267 error = writedisklabel(CCDLABELDEV(dev), | 2 3/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ 4 5/* 6 * Copyright (c) 1995 Jason R. Thorpe. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 1250 unchanged lines hidden (view full) --- 1260 1261 cs->sc_flags |= CCDF_LABELLING; 1262 1263 error = setdisklabel(&cs->sc_label, 1264 (struct disklabel *)data, 0); 1265 if (error == 0) { 1266 if (cmd == DIOCWDINFO) 1267 error = writedisklabel(CCDLABELDEV(dev), |
1268 ccdstrategy, &cs->sc_label); | 1268 &cs->sc_label); |
1269 } 1270 1271 cs->sc_flags &= ~CCDF_LABELLING; 1272 1273 ccdunlock(cs); 1274 1275 if (error) 1276 return (error); --- 153 unchanged lines hidden (view full) --- 1430 1431 lp->d_magic = DISKMAGIC; 1432 lp->d_magic2 = DISKMAGIC; 1433 lp->d_checksum = dkcksum(&cs->sc_label); 1434 1435 /* 1436 * Call the generic disklabel extraction routine. 1437 */ | 1269 } 1270 1271 cs->sc_flags &= ~CCDF_LABELLING; 1272 1273 ccdunlock(cs); 1274 1275 if (error) 1276 return (error); --- 153 unchanged lines hidden (view full) --- 1430 1431 lp->d_magic = DISKMAGIC; 1432 lp->d_magic2 = DISKMAGIC; 1433 lp->d_checksum = dkcksum(&cs->sc_label); 1434 1435 /* 1436 * Call the generic disklabel extraction routine. 1437 */ |
1438 if ((errstring = readdisklabel(CCDLABELDEV(dev), ccdstrategy, 1439 &cs->sc_label)) != NULL) | 1438 errstring = readdisklabel(CCDLABELDEV(dev), &cs->sc_label); 1439 if (errstring != NULL) |
1440 ccdmakedisklabel(cs); 1441 1442#ifdef DEBUG 1443 /* It's actually extremely common to have unlabeled ccds. */ 1444 if (ccddebug & CCDB_LABEL) 1445 if (errstring != NULL) 1446 printf("ccd%d: %s\n", unit, errstring); 1447#endif --- 81 unchanged lines hidden --- | 1440 ccdmakedisklabel(cs); 1441 1442#ifdef DEBUG 1443 /* It's actually extremely common to have unlabeled ccds. */ 1444 if (ccddebug & CCDB_LABEL) 1445 if (errstring != NULL) 1446 printf("ccd%d: %s\n", unit, errstring); 1447#endif --- 81 unchanged lines hidden --- |