Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gptfdisk
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
gptfdisk
Commits
fd058aed
Commit
fd058aed
authored
15 years ago
by
srs5694
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug that caused disk size to be read incorrectly on 32-bit
versions of FreeBSD.
parent
245a6a5a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG
+6
-0
6 additions, 0 deletions
CHANGELOG
gpt.h
+1
-1
1 addition, 1 deletion
gpt.h
support.cc
+3
-2
3 additions, 2 deletions
support.cc
with
10 additions
and
3 deletions
CHANGELOG
+
6
−
0
View file @
fd058aed
0.6.1 (1/??/2009):
0.6.1 (1/??/2009):
------------------
------------------
- Fixed bug that returned incorrect disk size on 32-bit versions of
FreeBSD.
- Fixed bug that prevented FreeBSD version from working on disk image
files.
- Fixed bug that caused BSD disklabel conversion to not work.
- Fixed bug that caused BSD disklabel conversion to not work.
0.6.0 (1/15/2009):
0.6.0 (1/15/2009):
...
...
This diff is collapsed.
Click to expand it.
gpt.h
+
1
−
1
View file @
fd058aed
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#ifndef __GPTSTRUCTS
#ifndef __GPTSTRUCTS
#define __GPTSTRUCTS
#define __GPTSTRUCTS
#define GPTFDISK_VERSION "0.6.1-pre
2
"
#define GPTFDISK_VERSION "0.6.1-pre
3
"
using
namespace
std
;
using
namespace
std
;
...
...
This diff is collapsed.
Click to expand it.
support.cc
+
3
−
2
View file @
fd058aed
...
@@ -588,6 +588,7 @@ int myWrite(int fd, char* buffer, int numBytes) {
...
@@ -588,6 +588,7 @@ int myWrite(int fd, char* buffer, int numBytes) {
// to work around a problem returning a uint64_t value on Mac OS.
// to work around a problem returning a uint64_t value on Mac OS.
uint64_t
disksize
(
int
fd
,
int
*
err
)
{
uint64_t
disksize
(
int
fd
,
int
*
err
)
{
long
sz
;
// Do not delete; needed for Linux
long
sz
;
// Do not delete; needed for Linux
uint64_t
size
=
0
;
// Do not delete; needed for FreeBSD
long
long
b
;
// Do not delete; needed for Linux
long
long
b
;
// Do not delete; needed for Linux
uint64_t
sectors
=
0
;
// size in sectors
uint64_t
sectors
=
0
;
// size in sectors
off_t
bytes
=
0
;
// size in bytes
off_t
bytes
=
0
;
// size in bytes
...
@@ -602,9 +603,9 @@ uint64_t disksize(int fd, int *err) {
...
@@ -602,9 +603,9 @@ uint64_t disksize(int fd, int *err) {
*
err
=
ioctl
(
fd
,
DKIOCGETBLOCKCOUNT
,
&
sectors
);
*
err
=
ioctl
(
fd
,
DKIOCGETBLOCKCOUNT
,
&
sectors
);
#else
#else
#ifdef __FreeBSD__
#ifdef __FreeBSD__
*
err
=
ioctl
(
fd
,
DIOCGMEDIASIZE
,
&
s
z
);
*
err
=
ioctl
(
fd
,
DIOCGMEDIASIZE
,
&
s
ize
);
b
=
GetBlockSize
(
fd
);
b
=
GetBlockSize
(
fd
);
sectors
=
s
z
/
b
;
sectors
=
s
ize
/
b
;
#else
#else
*
err
=
ioctl
(
fd
,
BLKGETSIZE
,
&
sz
);
*
err
=
ioctl
(
fd
,
BLKGETSIZE
,
&
sz
);
if
(
*
err
)
{
if
(
*
err
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment