Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioping
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ioping
Commits
2628f1c5
Commit
2628f1c5
authored
Jun 09, 2011
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parse_device() for freebsd and macos
parent
b39c7630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
ioping.c
ioping.c
+25
-0
No files found.
ioping.c
View file @
2628f1c5
...
...
@@ -292,6 +292,8 @@ void parse_options(int argc, char **argv)
errx
(
1
,
"no destination specified"
);
}
#ifdef __linux__
void
parse_device
(
dev_t
dev
)
{
char
*
buf
=
NULL
,
*
ptr
;
...
...
@@ -333,6 +335,29 @@ out:
fclose
(
file
);
}
#elif defined(__APPLE__) || defined(__FreeBSD__)
void
parse_device
(
dev_t
dev
)
{
struct
statfs
fs
;
(
void
)
dev
;
if
(
statfs
(
path
,
&
fs
))
return
;
fstype
=
strdup
(
fs
.
f_fstypename
);
device
=
strdup
(
fs
.
f_mntfromname
);
}
#else
void
parse_device
(
dev_t
dev
)
{
(
void
)
dev
;
}
#endif
off_t
get_device_size
(
int
fd
)
{
unsigned
long
long
blksize
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment