parted: Interface to GNU Parted Disk Partion Utility
1 Introduction
2 Interface
struct
(struct parted-disk ( unit path end transport sector-size physical-sector-size type-name model cylinders heads sectors cylinder-size partitions) #:extra-constructor-name make-parted-disk) unit : parted-unit? path : path? end : nonnegative-real? transport : string? sector-size : nonnegative-real? physical-sector-size : nonnegative-real? type-name : string? model : string? cylinders : (or/c #f nonnegative-integer?) heads : (or/c #f nonnegative-integer?) sectors : (or/c #f nonnegative-integer?) cylinder-size : (or/c #f nonnegative-integer?) partitions : (list-of parted-partition?)
struct
(struct parted-partition ( unit number start end size filesystem name flags type) #:extra-constructor-name make-parted-partition) unit : parted-unit? number : nonnegative-integer? start : nonnegative-real? end : nonnegative-real? size : (or/c #f nonnegative-real?) filesystem : string? name : string? flags : string? type : string?
procedure
(get-parted-disk #:disk disk-or-path [ #:unit unit]) → parted-disk? disk-or-path : parted-disk-or-path? unit : parted-unit? = 'byte
procedure
(parted-mklabel #:disk disk-or-path [ #:label-type label-type]) → void? disk-or-path : parted-disk-or-path? label-type : string? = "msdos"
(and (parted-partition? X) (eq? 'byte (parted-partition-unit X)))
procedure
(parted-mkpart/partition #:disk disk-or-path #:partition partition) → void? disk-or-path : disk-or-path? partition : nonnegative-integer?
procedure
(parted-mkpartfs #:disk disk-or-path #:partition-type partition-type #:filesystem-type filesystem-type [ #:unit unit] #:start start #:end end) → void? disk-or-path : disk-or-path? partition-type : string? filesystem-type : string? unit : parted-unit? = 'byte start : nonnegative-integer? end : nonnegative-integer?
3 Known Issues
Logic of distinguishing msdos partition types with info given is not yet 100% clear.
May need CHS unit support.
Needs more testing with different devices and operations.
4 History
- Version 2:1 —
2016-03-01 Documentation tweak.
- Version 2:0 —
2016-02-26 Moving from PLaneT to new package system.
- Version 1:0 —
2012-11-15 Initial release.
5 Legal
Copyright 2012, 2016 Neil Van Dyke. This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See http://www.gnu.org/licenses/ for details. For other licenses and consulting, please contact the author.