History

Merge tag 'for-5.16/cdrom-2021-10-29' of git://git.kernel.dk/linux-block

Pull CDROM updates from Jens Axboe: "On behalf of Phillip, here are the CDROM updates for the 5.16-rc1 merge window: - Add ioctl for improved media change detection (Lukas) - Reformat some documentation (Phillip) - Redundant variable removal (luo)" * tag 'for-5.16/cdrom-2021-10-29' of git://git.kernel.dk/linux-block: cdrom: Remove redundant variable and its assignment cdrom: docs: reformat table in Documentation/userspace-api/ioctl/cdrom.rst drivers/cdrom: improved ioctl for media change detection

Linus Torvalds committed 5 years ago

Commit 737f1cd2 parents fcaec17 bbc39255 files · +146 −61Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/cdrom.h+19−0
@@ -147,6 +147,8 @@ · 146 unmodified lines
147#define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */147#define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */
148#define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */148#define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */
149 149
150#define CDROM_TIMED_MEDIA_CHANGE 0x5396 /* get the timestamp of the last media change */
151
150/*******************************************************152/*******************************************************
151 * CDROM IOCTL structures153 * CDROM IOCTL structures
152 *******************************************************/154 *******************************************************/
@@ -295,6 +297,23 @@ struct cdrom_generic_command · 142 unmodified lines
295 };297 };
296};298};
297 299
300/* This struct is used by CDROM_TIMED_MEDIA_CHANGE */
301struct cdrom_timed_media_change_info {
302 __s64 last_media_change; /* Timestamp of the last detected media
303 * change in ms. May be set by caller,
304 * updated upon successful return of
305 * ioctl.
306 */
307 __u64 media_flags; /* Flags returned by ioctl to indicate
308 * media status.
309 */
310};
311#define MEDIA_CHANGED_FLAG 0x1 /* Last detected media change was more
312 * recent than last_media_change set by
313 * caller.
314 */
315/* other bits of media_flags available for future use */
316
298/*317/*
299 * A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336, 318 * A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336,
300 * 2340, or 2352 bytes long. 319 * 2340, or 2352 bytes long.