/[smeserver]/rpms/booty/sme8/booty-0.80.6-Fix-cutting-of-the-partition.patch
ViewVC logotype

Contents of /rpms/booty/sme8/booty-0.80.6-Fix-cutting-of-the-partition.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Sep 17 21:16:16 2011 UTC (13 years, 2 months ago) by slords
Branch: MAIN
CVS Tags: booty-0_80_6-10_el5_sme, booty-0_80_6-10, HEAD
Error occurred while calculating annotation data.
Upstream import

1 From 74763385b8f5b3e6f74a423aa726f0ea9332937c Mon Sep 17 00:00:00 2001
2 From: Ales Kozumplik <akozumpl@redhat.com>
3 Date: Fri, 13 May 2011 17:55:50 +0200
4 Subject: [booty rhel5-branch] Fix cutting of the partition 'p' in getDiskPart(). (#572862)
5
6 Before it worked OK for 'mapper/mpath1p2' but it failed to separate the
7 partition part from 'mapper/rootdevp1' (because the disk part contains no
8 digits)
9
10 This replaces the ancient part of the method with something simpler and
11 hopefully more general (though it's hard to say it doesn't brake some
12 other cases).
13 ---
14 bootyutil.py | 10 +++-------
15 1 files changed, 3 insertions(+), 7 deletions(-)
16
17 diff --git a/bootyutil.py b/bootyutil.py
18 index ea48c44..7b06fdb 100644
19 --- a/bootyutil.py
20 +++ b/bootyutil.py
21 @@ -35,13 +35,9 @@ def getDiskPart(dev):
22 cut = -1
23
24 name = dev[:cut]
25 -
26 - # hack off the trailing 'p' from /dev/cciss/*, for example
27 - if name[-1] == 'p':
28 - for letter in name:
29 - if letter not in string.letters and letter != "/":
30 - name = name[:-1]
31 - break
32 + if cut < 0 and name[-1] == 'p':
33 + # hack off the trailing 'p' if we found the partition part
34 + name = name[:-1]
35
36 if cut < 0:
37 partNum = int(dev[cut:]) - 1
38 --
39 1.7.3.3
40

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed