diff options
author | rsc <devnull@localhost> | 2007-05-28 17:41:28 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2007-05-28 17:41:28 +0000 |
commit | dcb5580cf084ca5a94f354e048b8f6b6e4dae630 (patch) | |
tree | bb00c6d2ffc0ee05c9fcec52fc911cebceb3dcdc /src/libdiskfs | |
parent | 92a9bc24f9bcc152b33c8f876cc13e9e1c95cfc8 (diff) | |
download | plan9port-dcb5580cf084ca5a94f354e048b8f6b6e4dae630.tar.gz plan9port-dcb5580cf084ca5a94f354e048b8f6b6e4dae630.tar.bz2 plan9port-dcb5580cf084ca5a94f354e048b8f6b6e4dae630.zip |
fix args
Diffstat (limited to 'src/libdiskfs')
-rw-r--r-- | src/libdiskfs/part.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/libdiskfs/part.c b/src/libdiskfs/part.c index d156457d..5d447479 100644 --- a/src/libdiskfs/part.c +++ b/src/libdiskfs/part.c @@ -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; +} |