Re: Size of a partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Octavian Purdila wrote:
By the looks of you partno, I am guessing that your kernel has large block device support, which means that sector_t is 64bits. If that's the case, use %llu instead of %lu for those fields with the type sector_t .

thanks, you were right. So I get the Size in Bytes by

ulong64 size = bdget(dev)->bd_part->nr_sects *
               bdget(dev)->bd_block_size;

thank you very much...


ciao


Sascha Effert fermat@xxxxxxxxxxxx


-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux