[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] remove duplicate patch canonicalization
From: |
Andreas Dilger |
Subject: |
[PATCH] remove duplicate patch canonicalization |
Date: |
Mon, 4 Feb 2002 00:21:44 -0700 |
User-agent: |
Mutt/1.2.5.1i |
Andrew,
this patch removes the duplicate call to canonicalize_file_name() from
_ped_device_probe(), because ped_device_get() itself does a call to
canonicalize_file_name() on the passed device path.
Since it is mingled in with my other changes to add a return code to
the _ped_device_probe() function, it may conflict with the previous patch
that I sent you with only those changes.
Cheers, Andreas
===================== parted-1.6.0-probe.diff =============================
--- libparted/device.c.orig Sun Dec 30 11:26:01 2001
+++ libparted/device.c Mon Feb 4 00:15:24 2002
@@ -101,27 +101,20 @@
return devices;
}
-void
+int
_ped_device_probe (const char* path)
{
- char* normalized_path;
PedDevice* dev;
PED_ASSERT (path != NULL, return);
- normalized_path = canonicalize_file_name (path);
- if (!normalized_path)
- /* Well, maybe it is just that the file does not exist.
- * Try it anyway. */
- normalized_path = strdup (path);
- if (!normalized_path)
- return;
ped_exception_fetch_all ();
- dev = ped_device_get (normalized_path);
+ dev = ped_device_get (path);
if (!dev)
ped_exception_catch ();
ped_exception_leave_all ();
- ped_free (normalized_path);
+
+ return dev ? 1 : 0;
}
void
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
- [PATCH] remove duplicate patch canonicalization,
Andreas Dilger <=