Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=9890c0cc614f4ef7f23770a7c678f609d30cef8b
commit 9890c0cc614f4ef7f23770a7c678f609d30cef8b Author: James Buren <[email protected]> Date: Sun Aug 26 23:39:23 2012 -0500 wrap partition table delete function in device class diff --git a/Device.cc b/Device.cc index d3cd5c6..da204bc 100644 --- a/Device.cc +++ b/Device.cc @@ -303,4 +303,12 @@ Partition *Device::newPartition(unsigned long long size) return part; } +void Device::deleteLastPartition() +{ + if(!_initialized || _table == 0) + return; + + _table->deleteLastPartition(); +} + // -%- strip: yes; add-newline: yes; use-tabs: no; indent-width: 2; tab-width: 2; -%- diff --git a/Device.hh b/Device.hh index 58604c7..7d3ae69 100644 --- a/Device.hh +++ b/Device.hh @@ -19,6 +19,7 @@ public: string getLabelType() { return (_table != 0) ? _table->getLabelType() : "unknown"; } void newPartitionTable(const string &label); Partition *newPartition(unsigned long long size); + void deleteLastPartition(); private: unsigned long long sizeToSectors(unsigned long long size) { return size / _sectorsize; } _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
