summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-07-28 09:50:51 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-07-28 09:50:51 +0200
commitf2e4a11df4ee4a67018421ca6c208009a590366b (patch)
treea35dab2b11f9d6d4fae895fa1e86effa8650f31c /apt-pkg
parent3952f883f3b60aaebe538afe3e8fb2b9f75c9262 (diff)
* apt-pkg/cdrom.{cc,h}:
- cleanup old ABI break avoidance hacks
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cdrom.cc10
-rw-r--r--apt-pkg/cdrom.h8
2 files changed, 4 insertions, 14 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 2a914c665..0ad1c69e5 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -874,9 +874,7 @@ pkgUdevCdromDevices::Dlopen() /*{{{*/
libudev_handle = h;
udev_new = (udev* (*)(void)) dlsym(h, "udev_new");
udev_enumerate_add_match_property = (int (*)(udev_enumerate*, const char*, const char*))dlsym(h, "udev_enumerate_add_match_property");
-#if 0 // FIXME: uncomment on next ABI break
udev_enumerate_add_match_sysattr = (int (*)(udev_enumerate*, const char*, const char*))dlsym(h, "udev_enumerate_add_match_sysattr");
-#endif
udev_enumerate_scan_devices = (int (*)(udev_enumerate*))dlsym(h, "udev_enumerate_scan_devices");
udev_enumerate_get_list_entry = (udev_list_entry* (*)(udev_enumerate*))dlsym(h, "udev_enumerate_get_list_entry");
udev_device_new_from_syspath = (udev_device* (*)(udev*, const char*))dlsym(h, "udev_device_new_from_syspath");
@@ -890,10 +888,8 @@ pkgUdevCdromDevices::Dlopen() /*{{{*/
return true;
}
/*}}}*/
-
/*{{{*/
-// compatiblity only with the old API/ABI, can be removed on the next
-// ABI break
+// convenience interface, this will just call ScanForRemovable
vector<CdromDevice>
pkgUdevCdromDevices::Scan()
{
@@ -918,10 +914,6 @@ pkgUdevCdromDevices::ScanForRemovable(bool CdromOnly)
if (CdromOnly)
udev_enumerate_add_match_property(enumerate, "ID_CDROM", "1");
else {
-#if 1 // FIXME: remove the next two lines on the next ABI break
- int (*udev_enumerate_add_match_sysattr)(struct udev_enumerate *udev_enumerate, const char *property, const char *value);
- udev_enumerate_add_match_sysattr = (int (*)(udev_enumerate*, const char*, const char*))dlsym(libudev_handle, "udev_enumerate_add_match_sysattr");
-#endif
udev_enumerate_add_match_sysattr(enumerate, "removable", "1");
}
diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index e83c38582..614062cbb 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -92,9 +92,7 @@ class pkgUdevCdromDevices /*{{{*/
struct udev_enumerate *(*udev_enumerate_new) (struct udev *udev);
struct udev_list_entry *(*udev_list_entry_get_next)(struct udev_list_entry *list_entry);
const char* (*udev_device_get_property_value)(struct udev_device *udev_device, const char *key);
-#if 0 // FIXME: uncomment on next ABI break
int (*udev_enumerate_add_match_sysattr)(struct udev_enumerate *udev_enumerate, const char *property, const char *value);
-#endif
// end libudev dlopen
public:
@@ -104,11 +102,11 @@ class pkgUdevCdromDevices /*{{{*/
// try to open
bool Dlopen();
- // this is the new interface
- vector<CdromDevice> ScanForRemovable(bool CdromOnly);
- // FIXME: compat with the old interface/API/ABI only
+ // convenience interface, this will just call ScanForRemovable
+ // with "APT::cdrom::CdromOnly"
vector<CdromDevice> Scan();
+ vector<CdromDevice> ScanForRemovable(bool CdromOnly);
};
/*}}}*/