summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-31cpukit/libblock: Ignore sync status prior to purgeKinsey Moore2-2/+2
2024-01-31cpukit/libblock: Ignore error notify return valueKinsey Moore1-1/+1
This is already in the error path.
2024-01-29cpukit/libblock: Ignore return value on error pathKinsey Moore1-1/+1
2024-01-16cpukit: Remove or use unused variable assignmentsKinsey Moore1-1/+1
2023-10-13cpukit: Remove unused includesKinsey Moore1-1/+0
2023-05-20Update company nameSebastian Huber22-22/+22
The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
2022-03-10cpukit/: Scripted embedded brains header file clean upJoel Sherrill20-121/+6
Updates #4625.
2022-02-28cpukit/libblock: Change license to BSD-2Joel Sherrill24-72/+528
Updates #3053.
2022-02-23cpukit/libblock: Clean up before license changeJoel Sherrill2-2/+5
2021-07-16cpukit: occured -> occurredSebastian Huber1-1/+1
2021-03-26libblock: Add rtems_bdbuf_peek()Christian Mauderer2-22/+64
Adds a peek function that allows (for example) a file system to suggest the next blocks that should be used for read ahead. This can increase the read speed of fragmented files. Update #3689
2020-10-12shell: Remove not functioning fdisk mount/unmountFrank Kühndel1-184/+0
The shell has an 'fdisk' command which has sub-commands 'mount' and 'unmount'. These two sub-commands have a bug which causes them to be not able to mount anything. This proposed patch removes the buggy file cpukit/libblock/src/bdpart-mount.c and the mount/unmount commands from 'fdisk' as bug fix. The 'fdisk' command itself is not removed. The reasons for removing the sub-commands (instead of fixing the issue) are: 1) The bug has been introduced on 2010-May-31 with commit 29e92b090c8bc35745aa5c89231ce806bcb11e57. Since ten years no one can use this feature, nor has anybody complained about it. 2) Besides of the 'fdisk' 'mount' sub-command, the shell has the usual 'mount' and 'unmount' commands which can serve as substitutes. 3) There are additional minor issues (see further down) which needed to be addressed when the file will be kept. What follows below is the precise bug description. The bug is in function rtems_bdpart_mount() which is only be used by the 'fdisk' shell command to mount all partitions of a disk with a single command: > fdisk DISK_NAME mount > mounts the file system of each partition of the disk > > fdisk DISK_NAME unmount > unmounts the file system of each partition of the disk The whole command does not work because in file cpukit/libblock/src/bdpart-mount.c line 103 specifies the file system type of each partition to be "msdos". Yet, "msdos" does not exist. The name must be "dosfs". Beside of this fundamental problem, there are more issues with the code in bdpart-mount.c: 1) The function returns RTEMS_SUCCESSFUL despite the mount always fails. 2) The reason for errors is not written to the terminal. 3) The directory '/mnt' is created but not deleted later on (failure or not). 3) There is no documentation about this special 'fdisk' feature in the RTEMS Shell Guide ('fdisk' is mentioned but its documentation is a bit short): https://docs.rtems.org/branches/master/shell/ file_and_directory.html#fdisk-format-disk 4) Only "msdos" formatted partitions can be mounted and all partitions are mounted read-only. This is hard coded and cannot be changed by options. Moreover, there is no information about this to the user of the shell (i.e. using 'fdisk' mount requires insider knowledge). How to reproduce: 1) For testing, I use the 'testsuites/samples/fileio.exe' sample with qemu: > cd rtems > env QEMU_AUDIO_DRV="none" qemu-system-arm -net none -nographic \ > -M realview-pbx-a9 -m 256M -kernel \ > build/arm/realview_pbx_a9_qemu/testsuites/samples/fileio.exe 2) Type any key to stop the timer and enter the sample tool. Type 's' to enter the shell, login as 'root' with the password shown in the terminal. 3) Type the following shell commands (they create a RAM disk, partition it, register it, format it and try to mount it): > mkrd > fdisk /dev/rda fat32 16 write mbr > fdisk /dev/rda register > mkdos /dev/rda1 > fdisk /dev/rda mount 4) The last line above is the command which fails - without an error message. There exists a '/mnt' directory but no '/mnt/rda1' directory as it should be: > ls -la /mnt 5) If you change line 103 of 'cpukit/libblock/src/bdpart-mount.c' from "msdos" to "dosfs", compile and build the executable and re-run the above test, '/mnt/rda1' exists (but the file system is mounted read-only). Close #4131
2020-10-12libblock: Fix sparse diskSebastian Huber1-34/+35
The qsort() in sparse_disk_get_new_block() may move the appended key which invalidates the pointer. Close #4142.
2020-10-11libblock: Add commentSebastian Huber1-0/+2
2020-10-10libblock: Fix string truncation warningFrank Kühndel1-1/+1
This patch does not only fix the compiler warning below. memcpy() is the better function at this place as the terminating NUL character is never copied here. Instead more characters will be appended to the 'logical_disk_name' later on. ../../../cpukit/libblock/src/bdpart-register.c:41:5: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
2020-08-04dosfs: Fix memory leak on failed mounts.Christian Mauderer1-0/+1
Currently if mount fails, a converter isn't destroyed. We have to take care of two cases: 1. The user doesn't provide a converter. In this case mounting a dosfs creates a default converter. This patch makes sure that the converter is destroyed again if mount failes for this case. 2. The user provides a converter. In this case it's not sure that the dosfs specific routines are reached because mount can fail before that. Therefore the user has to destroy the converter himself again. This patch adds a documentation for that and implements it in the media server. Closes #4042.
2020-07-17media-server: Add ability for retry.Christian Mauderer1-13/+17
This adds the possibility to request a retry in the media-listener if an operation failed. Usefull for example if you want to automatically reformat a disk if it wasn't possible to mount it.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber18-18/+36
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber16-21/+21
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2018-10-09build: Merge libblock/Makefile.amSebastian Huber1-40/+0
2018-10-02Use rtems_task_exit()Sebastian Huber1-3/+3
Update #3530. Update #3533.
2018-08-07libblock: Add RTEMS_DEPRECATEDSebastian Huber4-4/+15
Close #3358.
2018-08-07libblock: Use rtems_blkdev_create_partition()Sebastian Huber1-14/+2
Update #3358.
2018-08-07flashdisk: Use rtems_blkdev_create()Sebastian Huber1-47/+22
Update #3358.
2018-08-07nvdisk: Use rtems_blkdev_create()Sebastian Huber1-51/+19
Update #3358.
2018-08-07ramdisk: Use rtems_blkdev_create()Sebastian Huber2-34/+7
Update #3358.
2018-05-18libblock: Init deps in rtems_blkdev_create()Sebastian Huber1-4/+10
Update #3358.
2018-02-07libblock: Use self-contained mutex for mediaSebastian Huber1-68/+35
Update #2843.
2018-02-07libblock: Use self-contained mutex for sparse diskSebastian Huber1-28/+4
Update #2843.
2018-02-07libblock: Use self-contained mutex for flashdiskSebastian Huber1-74/+57
Update #2843.
2018-02-07libblock: Use self-contained mutex for nvdiskSebastian Huber1-53/+39
Update #2843.
2018-02-02libblock: Use self-contained mutex and cond varSebastian Huber1-282/+42
Update #2843.
2018-02-02libblock: Use self-contained mutex for disk lockSebastian Huber1-71/+30
Update #2843.
2018-01-25Remove make preinstallChris Johns11-3863/+0
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
2017-10-05posix: Implement self-contained POSIX mutexSebastian Huber1-2/+4
POSIX mutexes are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3112.
2017-07-28Fix IO control request typeSebastian Huber1-1/+1
2017-07-14posix/mmap: Add support for file handler and MAP_ANONKevin Kirspel1-0/+1
Added a mmap file handler to struct _rtems_filesystem_file_handlers_r. Updated each file handler object to support the default mmap handler. Updated mmap() to call the mmap handler for MAP_SHARED. Added a mmap file handler for shm Added support for MAP_ANON in mmap(). Updates #2859
2017-06-08libblock: FreeBSD kernel-space compatibilitySebastian Huber1-1/+1
Update #2833.
2017-01-24Use <sys/endian.h>Sebastian Huber1-13/+5
Update #2803.
2016-12-12libblock: Fix for RTEMS_DEBUGSebastian Huber1-0/+1
2016-11-24libblock: Fix for RTEMS_DEBUGSebastian Huber1-0/+2
2016-06-06libblock: Use proper semaphore attr for mutexSebastian Huber1-2/+1
Close #1452.
2016-05-25cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns3-17/+14
This change adds rtems_printf and related functions and wraps the RTEMS print plugin support into a user API. All references to the plugin are removed and replaced with the rtems_printer interface. Printk and related functions are made to return a valid number of characters formatted and output. The function attribute to check printf functions has been added to rtems_printf and printk. No changes to remove warrnings are part of this patch set. The testsuite has been moved over to the rtems_printer. The testsuite has a mix of rtems_printer access and direct print control via the tmacros.h header file. The support for begink/endk has been removed as it served no purpose and only confused the code base. The testsuite has not been refactored to use rtems_printf. This is future work.
2016-04-07libblock: Drop superfluous <stdlib.h> includeSebastian Huber3-1/+2
Drop superfluous <stdlib.h> include from <rtems/diskdevs.h> since this leads to conflicts with the latest Newlib in case this header file is used in the FreeBSD kernel space, e.g. for USB mass storage support.
2016-01-15libblock: Fix ramdisk::free_at_delete_request initSebastian Huber1-1/+1
Avoid uninitialized ramdisk::free_at_delete_request. The error was visible in sporadic libtests/block01 failures.
2015-11-02libblock: Print block sizes and countSebastian Huber3-0/+22
2015-11-02libblock: Avoid NULL pointer accessSebastian Huber1-1/+3
2015-10-26basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber9-27/+27
2015-10-26basdefs.h: Add and use RTEMS_DEPRECATEDSebastian Huber1-3/+3
2015-03-05libblock: Fix warningSebastian Huber1-2/+1