FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 05-06-2010, 08:54 PM
David Cantrell
 
Default Do not prepend /dev/disk/by-path in format DASD window

The deviceNameToDiskByPath() function returns the full link spec now
rather than just the basename.

Related: rhbz#589717
Related: rhbz#589713
---
storage/dasd.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/storage/dasd.py b/storage/dasd.py
index 6c9241f..96508b7 100644
--- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -108,7 +108,7 @@ class DASD:
if intf and askUser:
devs = '
for dasd, bypath in self._dasdlist:
- devs += "/dev/disk/by-path/%s
" % (bypath,)
+ devs += "%s
" % (bypath,)

rc = intf.questionInitializeDASD(c, devs)
if rc == 1:
@@ -147,7 +147,7 @@ class DASD:
pw = intf.progressWindow(title, msg, 100, pulse=True)

for dasd, bypath in self._dasdlist:
- log.info("Running dasdfmt on /dev/disk/by-path/%s" % (bypath,))
+ log.info("Running dasdfmt on %s" % (bypath,))
arglist = argv + ["/dev/" + dasd]

try:
--
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-06-2010, 09:25 PM
Chris Lumens
 
Default Do not prepend /dev/disk/by-path in format DASD window

> diff --git a/storage/dasd.py b/storage/dasd.py
> index 6c9241f..96508b7 100644
> --- a/storage/dasd.py
> +++ b/storage/dasd.py
> @@ -108,7 +108,7 @@ class DASD:
> if intf and askUser:
> devs = '
> for dasd, bypath in self._dasdlist:
> - devs += "/dev/disk/by-path/%s
" % (bypath,)
> + devs += "%s
" % (bypath,)
>
> rc = intf.questionInitializeDASD(c, devs)
> if rc == 1:
> @@ -147,7 +147,7 @@ class DASD:
> pw = intf.progressWindow(title, msg, 100, pulse=True)
>
> for dasd, bypath in self._dasdlist:
> - log.info("Running dasdfmt on /dev/disk/by-path/%s" % (bypath,))
> + log.info("Running dasdfmt on %s" % (bypath,))
> arglist = argv + ["/dev/" + dasd]
>
> try:

In #6 and #7, you assumed the caller was going to deal with the case
where a device's by-path is None. Should you perhaps be throwing those
out of self._dasdlist before getting to this point?

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-06-2010, 09:32 PM
David Cantrell
 
Default Do not prepend /dev/disk/by-path in format DASD window

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 6 May 2010, Chris Lumens wrote:


diff --git a/storage/dasd.py b/storage/dasd.py
index 6c9241f..96508b7 100644
--- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -108,7 +108,7 @@ class DASD:
if intf and askUser:
devs = '
for dasd, bypath in self._dasdlist:
- devs += "/dev/disk/by-path/%s
" % (bypath,)
+ devs += "%s
" % (bypath,)

rc = intf.questionInitializeDASD(c, devs)
if rc == 1:
@@ -147,7 +147,7 @@ class DASD:
pw = intf.progressWindow(title, msg, 100, pulse=True)

for dasd, bypath in self._dasdlist:
- log.info("Running dasdfmt on /dev/disk/by-path/%s" % (bypath,))
+ log.info("Running dasdfmt on %s" % (bypath,))
arglist = argv + ["/dev/" + dasd]

try:


In #6 and #7, you assumed the caller was going to deal with the case
where a device's by-path is None. Should you perhaps be throwing those
out of self._dasdlist before getting to this point?



Yeah, another patch.

diff --git a/storage/dasd.py b/storage/dasd.py
index 96508b7..83c3cde 100644
- --- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -85,6 +85,9 @@ class DASD:

if status in ["unformatted"] and device not in exclusiveDisks:
bypath = deviceNameToDiskByPath(device)
+ if not bypath:
+ bypath = "/dev/" + device
+
log.info(" %s (%s) status is %s, needs dasdfmt" % (device,
bypath,
status,))

- --
David Cantrell <dcantrell@redhat.com>

Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvjNVwACgkQ5hsjjIy1VknkhACgiJfvKv1yfZ 7W5tB5g7uA5bTR
75wAoKjGpbSX+zE8Li8MWMHd/cR+KbXc
=IGGO
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-07-2010, 06:09 AM
Hans de Goede
 
Default Do not prepend /dev/disk/by-path in format DASD window

Hi,

On 05/06/2010 11:32 PM, David Cantrell wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 6 May 2010, Chris Lumens wrote:


diff --git a/storage/dasd.py b/storage/dasd.py
index 6c9241f..96508b7 100644
--- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -108,7 +108,7 @@ class DASD:
if intf and askUser:
devs = '
for dasd, bypath in self._dasdlist:
- devs += "/dev/disk/by-path/%s
" % (bypath,)
+ devs += "%s
" % (bypath,)

rc = intf.questionInitializeDASD(c, devs)
if rc == 1:
@@ -147,7 +147,7 @@ class DASD:
pw = intf.progressWindow(title, msg, 100, pulse=True)

for dasd, bypath in self._dasdlist:
- log.info("Running dasdfmt on /dev/disk/by-path/%s" % (bypath,))
+ log.info("Running dasdfmt on %s" % (bypath,))
arglist = argv + ["/dev/" + dasd]

try:


In #6 and #7, you assumed the caller was going to deal with the case
where a device's by-path is None. Should you perhaps be throwing those
out of self._dasdlist before getting to this point?



Yeah, another patch.



Ack.


diff --git a/storage/dasd.py b/storage/dasd.py
index 96508b7..83c3cde 100644
- --- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -85,6 +85,9 @@ class DASD:

if status in ["unformatted"] and device not in exclusiveDisks:
bypath = deviceNameToDiskByPath(device)
+ if not bypath:
+ bypath = "/dev/" + device
+
log.info(" %s (%s) status is %s, needs dasdfmt" % (device,
bypath,
status,))

- -- David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvjNVwACgkQ5hsjjIy1VknkhACgiJfvKv1yfZ 7W5tB5g7uA5bTR
75wAoKjGpbSX+zE8Li8MWMHd/cR+KbXc
=IGGO
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org