disk.c (de04d704a98a7d2e9e57ebd83d2dd7a19fc11dab) | disk.c (48990fce8e1c5e572a91656a6f1d58dddba8a4a6) |
---|---|
1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * Copyright (c) 2012 Andrey V. Elsukov <ae@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 256 unchanged lines hidden (view full) --- 265 if (ptable_gettype(od->table) == PTABLE_BSD && 266 partition >= 0) { 267 /* It doesn't matter what value has d_slice */ 268 rc = ptable_getpart(od->table, &part, partition); 269 if (rc == 0) { 270 dev->d_offset = part.start; 271 od->entrysize = part.end - part.start + 1; 272 } | 1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * Copyright (c) 2012 Andrey V. Elsukov <ae@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 256 unchanged lines hidden (view full) --- 265 if (ptable_gettype(od->table) == PTABLE_BSD && 266 partition >= 0) { 267 /* It doesn't matter what value has d_slice */ 268 rc = ptable_getpart(od->table, &part, partition); 269 if (rc == 0) { 270 dev->d_offset = part.start; 271 od->entrysize = part.end - part.start + 1; 272 } |
273 } else if (ptable_gettype(od->table) == PTABLE_ISO9660) { 274 dev->d_offset = 0; 275 od->entrysize = mediasize; |
|
273 } else if (slice >= 0) { 274 /* Try to get information about partition */ 275 if (slice == 0) 276 rc = ptable_getbestpart(od->table, &part); 277 else 278 rc = ptable_getpart(od->table, &part, slice); 279 if (rc != 0) /* Partition doesn't exist */ 280 goto out; --- 152 unchanged lines hidden --- | 276 } else if (slice >= 0) { 277 /* Try to get information about partition */ 278 if (slice == 0) 279 rc = ptable_getbestpart(od->table, &part); 280 else 281 rc = ptable_getpart(od->table, &part, slice); 282 if (rc != 0) /* Partition doesn't exist */ 283 goto out; --- 152 unchanged lines hidden --- |