summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/cdromutl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Convert users of {MD5,SHA1,SHA256,SHA512}Summation to use HashesJulian Andres Klode2020-01-141-3/+3
| | | | | | | This makes use of the a function GetHashString() that returns the specific hash string. We also need to implement another overload of Add() for signed chars with sizes, so the existing users do not require reinterpret_cast everywhere.
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* avoid some useless casts reported by -Wuseless-castDavid Kalnischkies2017-12-131-19/+14
| | | | | | | | | The casts are useless, but the reports show some where we can actually improve the code by replacing them with better alternatives like converting whatever int type into a string instead of casting to a specific one which might in the future be too small. Reported-By: gcc -Wuseless-cast
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-7/+7
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* ident a CD without changing directoryDavid Kalnischkies2017-06-261-23/+23
|
* fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-101-0/+2
| | | | | | | | Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
* reimplement the last uses of sprintfDavid Kalnischkies2015-04-101-15/+16
| | | | | | | | Working with strings c-style is complicated and error-prune, so by converting to c++ style we gain some simplicity and avoid buffer overflows by later extensions. Git-Dch: Ignore
* support very long mtab entries in mountpoint discoveryDavid Kalnischkies2014-03-131-25/+23
| | | | | | Old code limited lines to 250 characters which is probably enough for everybody, but who knows… It also takes care of device nodes which start with the same prefix.
* no error for non-existing mountpoints in MountCdromDavid Kalnischkies2014-03-131-8/+20
| | | | | | | | | The mountpoint might be auto-generated by the mount command so pushing an error on the stack will confuse the following code and let it believe an unrecoverable error occured while potentially everything is okay. Same goes for umount as a non-existing mountpoint is by definition not mounted.
* if mountpoint has a ".disk" directory it is mountedDavid Kalnischkies2014-03-131-2/+7
| | | | | | | | | | | | Checking that parent-directory of mountpoint and mountpoint are on different devices is fine most of the time, but is too restrictive for our testcases and there shouldn't be anything wrong with 'normal' users copying disk-contents around either if they want to. We check for the existance of the ".disk/" directory now as this will not be present if the disk isn't 'mounted'. Disks doesn't need to have such a directory through, so for those we fall back to the old way of detecting mounted or not mounted.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-1/+4
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-2/+2
|
* rework the code in cdromutl.cc to make coverity (more) happyMichael Vogt2013-07-251-1/+2
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-0/+2
|
* merge with debian/experimentalDavid Kalnischkies2011-09-131-1/+3
|\
| * * apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:Michael Vogt2011-07-261-6/+2
| | | | | | | | - add new DeEscapeString() similar to DeQuoteQuotedWord but unescape charackter escapes like \0XXX and \xXX (plus add test)
| * * apt-pkg/contrib/cdromutl.cc:Michael Vogt2011-07-251-1/+7
| | | | | | - fix escape problem when looking for the mounted devices
* | reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+4
|/
* fix a bunch of cppcheck warnings/errors based on a patch byDavid Kalnischkies2011-04-161-6/+10
| | | Niels Thykier, thanks! (Closes: #622805)
* apt-pkg/contrib/cdromutl.{cc,h}: return string for mountpath; ↵Michael Vogt2011-03-091-3/+3
| | | | apt-pkg/cdrom.cc: use string
* apt-pkg/contrib/cdromutl.{cc,h}: add FindMountPointForDevice helper; ↵Michael Vogt2011-03-041-0/+31
| | | | apt-pkg/cdrom.cc: deal with missing FSTAB_DIR
* apt-pkg/contrib/cdromutl.cc: do not take Buf.f_bfree into account on ↵Michael Vogt2010-09-101-4/+12
| | | | writable media
* apt-pkg/contrib/cdromutl.cc: style fixes (thanks to David for his code-review)Michael Vogt2010-09-101-3/+3
|
* * apt-pkg/contrib/cdromutl.cc:Michael Vogt2010-09-101-0/+10
| | | | | | - if apt-cdrom is used on writable media (like usb-sticks), do not use the root directory to identify the medium (as all changes there change the ident id). Use the .disk directory instead
* * apt-pkg/contrib/cdromutl.cc:Michael Vogt2010-01-221-21/+30
| | | | - fix UnmountCdrom() fails, give it a bit more time and try the umount again
* * methods/cdrom.cc:Michael Vogt2009-07-221-3/+10
| | | | | | | - add Acquire::Cdrom::mount "apt-udev-auto" magic to allow dynamically finding the cdrom device * apt-pkg/contrib/cdromutl.{h,cc}: - support additional (optional) DeviceName parameter for MountCdrom()
* fix various -Wall warningsMichael Vogt2008-08-051-1/+2
|
* * remove all the remaining #pragma implementationMichael Vogt2007-06-081-3/+0
|
* Join with aliencodeArch Librarian2004-09-201-6/+8
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* HP-UX fixesArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-12-10 23:40:29 GMT HP-UX fixes
* More Solaris fixesArch Librarian2004-09-201-4/+4
| | | | | | Author: jgg Date: 1999-12-10 06:30:42 GMT More Solaris fixes
* Added castArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-08-30 07:48:04 GMT Added cast
* Minor cleanups, fix for checksum lowercase bugArch Librarian2004-09-201-25/+3
| | | | | | Author: jgg Date: 1999-07-26 17:46:07 GMT Minor cleanups, fix for checksum lowercase bug
* CDROM debug optionArch Librarian2004-09-201-10/+15
| | | | | | Author: jgg Date: 1999-07-02 22:20:50 GMT CDROM debug option
* Changed CD ident rountine to not use inodesArch Librarian2004-09-201-5/+17
| | | | | | Author: jgg Date: 1999-06-05 03:54:29 GMT Changed CD ident rountine to not use inodes
* Fixed sparc compile warningArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 1999-04-20 05:11:17 GMT Fixed sparc compile warning
* Working apt-get source build stuffArch Librarian2004-09-201-11/+3
| | | | | | Author: jgg Date: 1999-04-20 05:02:09 GMT Working apt-get source build stuff
* CDrom fixesArch Librarian2004-09-201-17/+52
| | | | | | Author: jgg Date: 1999-04-03 01:05:24 GMT CDrom fixes
* CDROM patches from bluehornArch Librarian2004-09-201-4/+27
| | | | | | Author: jgg Date: 1999-03-28 01:37:26 GMT CDROM patches from bluehorn
* CDROM stuff from apt-cdromArch Librarian2004-09-201-0/+157
Author: jgg Date: 1998-11-29 01:19:27 GMT CDROM stuff from apt-cdrom