summaryrefslogtreecommitdiff
path: root/cmdline/apt-cdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-02 08:32:34 +0200
committerMichael Vogt <mvo@debian.org>2013-07-02 08:32:34 +0200
commit8e4c3f0a42664b8c37cc2e0de285849fbf118e11 (patch)
tree059b76fef1c1636a7e1ad16e5a4ce06304271718 /cmdline/apt-cdrom.cc
parent25a4d2049fb79bc2c86cd45e977b4a071e5300ac (diff)
parente3c62328abbd548bb0da42fdbad954b3ce4f7102 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Conflicts: debian/changelog
Diffstat (limited to 'cmdline/apt-cdrom.cc')
-rw-r--r--cmdline/apt-cdrom.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 2551f4916..70e49910c 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -150,14 +150,12 @@ bool DoAdd(CommandLine &)
bool res = true;
bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect", true);
+ unsigned int count = 0;
if (AutoDetect && UdevCdroms.Dlopen())
- {
- unsigned int count = 0;
while (AutoDetectCdrom(UdevCdroms, count))
res &= cdrom.Add(&log);
- } else {
+ if (count == 0)
res = cdrom.Add(&log);
- }
if(res)
cout << _("Repeat this process for the rest of the CDs in your set.") << endl;
@@ -178,15 +176,12 @@ bool DoIdent(CommandLine &)
bool AutoDetect = _config->FindB("Acquire::cdrom::AutoDetect");
+ unsigned int count = 0;
if (AutoDetect && UdevCdroms.Dlopen())
- {
- unsigned int count = 0;
while (AutoDetectCdrom(UdevCdroms, count))
res &= cdrom.Ident(ident, &log);
- } else {
+ if (count == 0)
return cdrom.Ident(ident, &log);
- }
-
return res;
}
/*}}}*/