for-5.16/cdrom-2021-10-29
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmF8M0EQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpv9yEAC8ZEn5XivbOZ3ZEMxZaFMUK6PzUKZA7tzj L94E1h7gbnsu7HcRsNz1jAHgdreMR/66o1R7jZxdB/knM+AKA8bKAMgSt1FIhaA7 xLOF1CJIeGtEsS8GATb7w8Uz1PRWhy6vsrR+DMeAyXCZsG31Lchm9qvZCYpkZM6c 3gGY8GhDPXPBBnVRk1R9IhJLxSbP7JFQlGb0ywfeW+AWGZszJDrUI61FCsauyBE8 e8edQrUtR1CnboqYBKe3rZfh2nn9FYcDyQ/7r2mqnC5fLGyNUWwhEH5aju+QyDan H4+T3HYKUZd77OjPeEp5VzHCcJupBpsa/m0LKjRhnc3NqnSyjo0bwEJ8kqz9JjXa 9DmpF/zCZy0rIK/iuUa09suTHXJ/JnuDKV+P66K5dW7t+4gwwXcBhsaB5bNyK1ha +VwkarKOkB/ngGD1Jm0ctykFdwsqKXa6ZjGgePWiNXeO9y8ZeCgKfPbl+4G8N5Db 0uGGK0IfiHwIcgz2zJL/7k3CEmiuVNhOrFtFOfGKBhOQiEpUR8Yxf4Ox9vgfQ9qL FTguI+VWs6zXJAhx4NdxTAR+fprQPt3u2iszs2E1IbXk0leRW75g/sAeoe36KiPK 8H/CcJbLrN+5n8g+pckz94zOW1K3GilXBPj0ZRualIJKEbrhcAjLNpx+Esx+wl0S 8ZdzWf6dDQ== =NmI1 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
737f1cd8a8
5 changed files with 146 additions and 61 deletions
|
|
@ -147,6 +147,8 @@
|
|||
#define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */
|
||||
#define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */
|
||||
|
||||
#define CDROM_TIMED_MEDIA_CHANGE 0x5396 /* get the timestamp of the last media change */
|
||||
|
||||
/*******************************************************
|
||||
* CDROM IOCTL structures
|
||||
*******************************************************/
|
||||
|
|
@ -295,6 +297,23 @@ struct cdrom_generic_command
|
|||
};
|
||||
};
|
||||
|
||||
/* This struct is used by CDROM_TIMED_MEDIA_CHANGE */
|
||||
struct cdrom_timed_media_change_info {
|
||||
__s64 last_media_change; /* Timestamp of the last detected media
|
||||
* change in ms. May be set by caller,
|
||||
* updated upon successful return of
|
||||
* ioctl.
|
||||
*/
|
||||
__u64 media_flags; /* Flags returned by ioctl to indicate
|
||||
* media status.
|
||||
*/
|
||||
};
|
||||
#define MEDIA_CHANGED_FLAG 0x1 /* Last detected media change was more
|
||||
* recent than last_media_change set by
|
||||
* caller.
|
||||
*/
|
||||
/* other bits of media_flags available for future use */
|
||||
|
||||
/*
|
||||
* A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336,
|
||||
* 2340, or 2352 bytes long.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue