summaryrefslogtreecommitdiffstats
path: root/src/disk.c
AgeCommit message (Collapse)AuthorFilesLines
2021-05-01disk: Respect -s (simulate) flag for dump -e operationPali Rohár1-14/+22
2021-05-01disk: Implement flashing mmc imagesPali Rohár1-14/+74
2021-01-05disk: Fix detecting Nokia N9 devicePali Rohár1-2/+2
2019-09-30disk: Check if reading from block device failedPali Rohár1-0/+5
2018-02-08disk: Fix detection of busnumPali Rohár1-1/+9
Unpatched version of libusb on linux platform does not set location, but Debian's version of libusb has a patch which set it. For compatibility with other systems without unpatched libusb version, read busnum from dirname which seems to be always set. Fixes: https://github.com/pali/0xFFFF/issues/5
2018-02-08disk: Remove remaining ENOMEDIUMPali Rohár1-1/+1
2018-02-08disk: Fix swapping maj1:min1 and maj2:min2Pali Rohár1-1/+1
2018-02-08disk: Fix compile warning: comparison between signed and unsigned integer ↵Pali Rohár1-1/+1
expressions
2018-02-08disk: Open whole block device with O_NONBLOCKPali Rohár1-6/+4
This would simplify handling of ENOMEDIUM error.
2018-02-08disk: Ensure that maj1:min1 is first device and maj2:min2 is second devicePali Rohár1-0/+11
2017-07-09disk: After opening blkdev, check that it is really block devicePali Rohár1-0/+4
2017-07-09disk: Close device file handle when freeing structuresPali Rohár1-0/+7
2017-07-09disk: Fix detection of correct device in disk_open_dev()Pali Rohár1-20/+38
2017-07-06disk: Choose correct partition in disk_open_dev()Pali Rohár1-2/+8
2017-01-09disk: Remove check which is always falsePali Rohár1-5/+0
Type unsigned long long int according to C99 can store at least 2^64-1.
2016-12-23disk: Fix for RM-680Pali Rohár1-2/+2
2016-12-23disk: Check for ENOMEDIUM when partition is requiredPali Rohár1-2/+12
2016-12-17all: Use #include <sys/sysmacros.h> for major() instead #define _BSD_SOURCEPali Rohár1-6/+1
2016-12-07disk: Do not fail when empty block device is exportedPali Rohár1-2/+4
2016-12-06all: Compile globally without _GNU_SOURCE, define _BSD_SOURCE or _GNU_SOURCE ↵Pali Rohár1-0/+6
where needed
2016-12-06all: Revert libusb-1.0 supportPali Rohár1-10/+4
Listing of usb devices with libusb-1.0 is too slow and not usable for flashing or cold-flashing Nokia N900. Old libusb (0.1) does not have this problem and works perfectly. Problem for libusb-1.0 was reported at least two times into libusb-devel mailing list, but upstream developers are totally ignore it. One message is in archive: https://sourceforge.net/p/libusb/mailman/message/34985373/ Because of that there is just one option: use tested and working libusb 0.1 library instead some experimental and non-working libusb-1.0.
2016-05-12disk: Fix detection of MyDocs partition in DISK RAW mode for non RX-51 devicesPali Rohár1-10/+28
2016-02-12disk: Use correct libusb function which returns Linux devnum valuePali Rohár1-1/+1
It is libusb_get_device_address() and not libusb_get_port_number()
2016-01-23all: Rename variable readed to sentPali Rohár1-6/+6
2016-01-23all: Switch to libusb-1.0Sebastian Reichel1-4/+10
libusb 0.1 is deprecated. This updates 0xFFFF to use the newer libusb 1.0 API instead.
2016-01-13disk: dirent.h is required for DIRSebastian Reichel1-0/+1
Without <dirent.h> include newer gcc releases throw warnings about undefined "DIR".
2016-01-13all: free() is defined in stdlib.hSebastian Reichel1-0/+1
Without including <stdlib.h> newer gcc releases throw warnings about undefined free().
2016-01-10all: Check for return value of lseekPali Rohár1-1/+4
2014-11-26all: Fix overflow in shift operatorsPali Rohár1-1/+1
2014-11-26disk: Enable Linux code only on LinuxPali Rohár1-1/+41
2014-11-21disk: Implement disk_dump_image()Pali Rohár1-5/+4
2014-11-21disk: Find emmc device in disk_init()Pali Rohár1-1/+88
2014-11-21disk: Ignore '.' and '..' when listing directoryPali Rohár1-0/+3
2014-11-21disk: Remove old disk functions (they are not used anymore)Pali Rohár1-108/+0
2014-11-21disk: Implement new functions for raw disk accessPali Rohár1-0/+186
2014-11-18disk: Implement init and get_device functionsPali Rohár1-5/+2
2014-05-10all: Fix typo0.6Pali Rohár1-1/+1
2012-11-24disk: Added function disk_dump_raw for dumping raw block devicePali Rohár1-0/+121
2012-11-20disk: Fix unused parameter warningsPali Rohár1-0/+9
2012-11-20disk: Fix return valuesPali Rohár1-1/+13
2012-11-15Added template for USB RAW disk modePali Rohár1-0/+46