Author: tsoome
Date: Tue Jul 7 12:24:40 2020
New Revision: 362989
URL: https://svnweb.freebsd.org/changeset/base/362989
Log:
loader: geli_dev_ioctl does return huge mediasize
The DIOCGMEDIASIZE is calculated md->md_sectorsize * md->md_provsize, and
for boot disk, the md_sectorsize is 4k. However, the md_provsize is already
in units of bytes.
Sponsored by: Netflix, Klara Inc.
Modified:
head/stand/libsa/geli/gelidev.c
Modified: head/stand/libsa/geli/gelidev.c
==============================================================================
--- head/stand/libsa/geli/gelidev.c Tue Jul 7 12:10:59 2020
(r362988)
+++ head/stand/libsa/geli/gelidev.c Tue Jul 7 12:24:40 2020
(r362989)
@@ -219,7 +219,7 @@ geli_dev_ioctl(struct open_file *f, u_long cmd, void *
*(u_int *)data = md->md_sectorsize;
break;
case DIOCGMEDIASIZE:
- *(uint64_t *)data = md->md_sectorsize * md->md_provsize;
+ *(uint64_t *)data = md->md_provsize;
break;
default:
return (ENOTTY);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"