diff options
author | 2006-03-02 21:37:58 +0000 | |
---|---|---|
committer | 2006-03-02 21:37:58 +0000 | |
commit | 8b4573384bc0462fce97d85e8af4f74a54a1cd06 (patch) | |
tree | 29925775a248348b4b8153b3cb97d32a5fbe7634 /src/templates | |
parent | properly check ntfsresize return value (diff) | |
download | gli-8b4573384bc0462fce97d85e8af4f74a54a1cd06.tar.gz gli-8b4573384bc0462fce97d85e8af4f74a54a1cd06.tar.bz2 gli-8b4573384bc0462fce97d85e8af4f74a54a1cd06.zip |
src/templates/x86ArchitectureTemplate.py:
proper return code checking for ext2/3 resizing
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1329 f8877401-5920-0410-a79b-8e2d7e04ca0d
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/x86ArchitectureTemplate.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/templates/x86ArchitectureTemplate.py b/src/templates/x86ArchitectureTemplate.py index 775d807..e01df3e 100644 --- a/src/templates/x86ArchitectureTemplate.py +++ b/src/templates/x86ArchitectureTemplate.py @@ -5,7 +5,7 @@ # of which can be found in the main directory of this project. Gentoo Linux Installer -$Id: x86ArchitectureTemplate.py,v 1.103 2006/03/01 19:43:48 agaffney Exp $ +$Id: x86ArchitectureTemplate.py,v 1.104 2006/03/02 21:37:58 agaffney Exp $ Copyright 2004 Gentoo Technologies Inc. @@ -249,6 +249,7 @@ class x86ArchitectureTemplate(ArchitectureTemplate): start = tmppart['start'] # Replace 512 with code to retrieve bytes per sector for device end = start + (long(tmppart['mb']) * MEGABYTE / 512) + tmppart['end'] = end for i in new_part_list: if i <= new_part: continue if parts_new[device][i]['start'] and end >= parts_new[device][i]['start']: @@ -259,7 +260,7 @@ class x86ArchitectureTemplate(ArchitectureTemplate): if type == "ext2" or type == "ext3": total_sectors = end - start + 1 ret = GLIUtility.spawn("resize2fs " + device + str(minor) + " " + str(total_sectors) + "s") - if ret: # Resize error + if not GLIUtility.exitsuccess(ret): # Resize error raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize " + device + str(minor)) elif type == "ntfs": total_sectors = end - start + 1 |