<div dir="ltr">I'm trying to use major() and minor() to convert st_dev in stat to the major and minor for block files. The values I'm getting aren't matching what the system ls function returns. Is there anything more than just passing st_dev to the major() and minor() macros then printing it out? The program compiles and runs fine but I get different values.<div>
<br></div><div>Also which files do we need to use major/minor for? block and character?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 1:12 PM, yluo4 <span dir="ltr"><<a href="mailto:yluo4@stevens.edu" target="_blank">yluo4@stevens.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Sorry, I didn't read the instruction carefully. I has said we should use the major and minor device numbers instead of file size.<br>
Yulong<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 10/07/2013 11:43 AM, yluo4 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
Is st_size in stat only used to check regular file, symbolic file,<br>
and directory file size? I find that other types file's st_size is 0.<br>
How can we get these files' size?<br>
Thank you,<br>
Yulong<br>
______________________________<u></u>_________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/<u></u>mailman/listinfo/cs631apue</a><br>
</blockquote>
______________________________<u></u>_________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/<u></u>mailman/listinfo/cs631apue</a><br>
</div></div></blockquote></div><br></div>