[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
store_typed_open on non-typed names
From: |
James A Morrison |
Subject: |
store_typed_open on non-typed names |
Date: |
Mon, 7 Oct 2002 19:42:04 -0400 (EDT) |
Hi,
While trying to get parted to work I discovered that parted /dev/sd0
segfaulted in dlysm, but parted :/dev/sd0 and parted device:sd0 worked.
So I looked into libstore/typed.c and I didn't understand the 2nd half of
store_find_class which contained the calls to dlsym. So, I looked some more
found what Marcus was trying to explain to me in store_typed_open. So low
and behold in store_typed_open store_open is called if the first character
in NAME is a ':', so I figured that if the NAME didn't a colon that the
same thing should happen if the first character is a colon. So here is the
patch.
2002-10-07 James A Morrison <ja2morri@uwaterloo.ca>
* typed.c (store_typed_open): Use store_open if NAME does not contain
a ':'.
Index: typed.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libstore/typed.c,v
retrieving revision 1.6
diff -u -b -r1.6 typed.c
--- typed.c 14 Mar 2002 21:10:01 -0000 1.6
+++ typed.c 7 Oct 2002 23:20:42 -0000
@@ -116,6 +116,9 @@
if (clname_end == name)
/* Open NAME with store_open. */
return store_open (name + 1, flags, classes, store);
+
+ if (!clname_end)
+ return store_open (name, flags, classes, store);
/* Try to find an existing class by the given name. */
cl = store_find_class (name, clname_end, classes);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- store_typed_open on non-typed names,
James A Morrison <=