[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Libstore && libparted patches.
From: |
Harley D. Eades III |
Subject: |
Libstore && libparted patches. |
Date: |
14 Aug 2004 14:25:56 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
I sent in bad patches here are the correct ones.
To recap libstore was not storing the contents of errno
when testing it. Libparted was not checking if the user
supplies a patch to a device or a store typed device name.
Sorry about so many emails.
thanks hde
--- libstore/module.c 2003-08-02 17:02:03.000000000 -0500
+++ /home/hde/module.c 2004-08-14 10:19:14.000000000 -0500
@@ -31,6 +31,7 @@
{
char *modname, *clsym;
void *mod;
+ error_t err;
/* Construct the name of the shared object for this module. */
if (asprintf (&modname,
@@ -46,16 +47,17 @@
errno = 0;
mod = dlopen (modname, RTLD_LAZY);
+ err = errno;
if (mod == NULL)
{
const char *errstring = dlerror (); /* Must always call or it leaks! */
- if (errno != ENOENT)
+ if (err != ENOENT)
/* XXX not good, but how else to report the error? */
error (0, 0, "cannot load %s: %s", modname, errstring);
}
free (modname);
if (mod == NULL)
- return errno ?: ENOENT;
+ return err ?: ENOENT;
if (asprintf (&clsym, "store_%.*s_class",
(int) (clname_end - name), name) < 0)
--- /home/hde/PATCHED_parted-1.6.11/libparted/gnu.c 2004-08-13
09:57:20.000000000 -0500
+++ /home/hde/parted-1.6.11/libparted/gnu.c 2004-04-24 22:34:00.000000000
-0500
@@ -235,16 +235,7 @@
arch_specific->consume = 1;
retry_open:
- /* Simple test to determine if the user uses a path or TYPE:NAME. */
- if (strchr (path, '/') == NULL)
- {
- err = store_typed_open (dev->path, 0, NULL, &arch_specific->store);
- }
- else
- {
- err = store_open (dev->path, 0, NULL, &arch_specific->store);
- }
-
+ err = store_typed_open (dev->path, 0, NULL, &arch_specific->store);
if (err) {
error_t rw_err = err;
- Libstore && libparted patches.,
Harley D. Eades III <=