Q: How come "probepart" shows partitions to be 2X size?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

Q: How come "probepart" shows partitions to be 2X size?

#1 Post by sunburnt »

Subject says it...
Just a thought I had, not really critical. 8)

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#2 Post by 8-bit »

I just tried it from a terminal and I see what you mean.
But here is an interesting thing.
If you instead of "probepart", type "probepart --help" you do not get help.
Instead, you get probepart displaying the correct size values!
Go figure.

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: Q: How come "probepart" shows partitions to be 2X size?

#3 Post by DMcCunney »

sunburnt wrote:Subject says it...
Just a thought I had, not really critical. 8)
Hmmm. I see 8-bit's results. Looks like it's using two different standard unit sizes, depending on whether you run it with or without an argument. (And it doesn't seem to matter what the argument is.)

Update: It's a script in /sbin, and takes -k or -m as parameters.
______
Dennis

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#4 Post by 8-bit »

Thank you! I assume the -k parameter is for displaying value as kilobytes and the -m parameter is for displaying megabytes.

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#5 Post by DMcCunney »

8-bit wrote:Thank you! I assume the -k parameter is for displaying value as kilobytes and the -m parameter is for displaying megabytes.
Correct. I haven't tried to analyze it to see what it defaults to if a parm isn't provided. Offhand, I'd guess it defaults to 512 bytes, which would be the disk block size.
______
Dennis

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#6 Post by technosaurus »

block size is set to 512 maybe it should be 1024?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#7 Post by DMcCunney »

technosaurus wrote:block size is set to 512 maybe it should be 1024?
You mean, set the default value to 1,024?

I can see the value in having it report in disk block sizes, but it ought to state what unit size it's using. And it ought to return a meaningful usage message in response to a -h parameter.
______
Dennis

Post Reply