mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
fix args
This commit is contained in:
parent
92a9bc24f9
commit
dcb5580cf0
1 changed files with 14 additions and 3 deletions
|
@ -28,7 +28,9 @@ diskpartsync(Disk *dd)
|
|||
{
|
||||
DiskPart *d = (DiskPart*)dd;
|
||||
|
||||
return disksync(d->subdisk);
|
||||
if(d->subdisk)
|
||||
return disksync(d->subdisk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -36,12 +38,13 @@ diskpartclose(Disk *dd)
|
|||
{
|
||||
DiskPart *d = (DiskPart*)dd;
|
||||
|
||||
diskclose(d->subdisk);
|
||||
if(d->subdisk)
|
||||
diskclose(d->subdisk);
|
||||
free(d);
|
||||
}
|
||||
|
||||
Disk*
|
||||
diskpart(Disk *subdisk, u64int size, u64int offset)
|
||||
diskpart(Disk *subdisk, u64int offset, u64int size)
|
||||
{
|
||||
DiskPart *d;
|
||||
|
||||
|
@ -58,3 +61,11 @@ diskpart(Disk *subdisk, u64int size, u64int offset)
|
|||
|
||||
return &d->disk;
|
||||
}
|
||||
|
||||
void
|
||||
diskpartabandon(Disk *d)
|
||||
{
|
||||
if(d->_read != diskpartread)
|
||||
abort();
|
||||
d->subdisk = nil;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue