projects
/
platform
/
upstream
/
libatasmart.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
make things a proper library
[platform/upstream/libatasmart.git]
/
skdump.c
1
#include <string.h>
2
#include <errno.h>
3
4
#include "smart.h"
5
6
int main(int argc, char *argv[]) {
7
int ret;
8
const char *device;
9
SkDevice *d;
10
11
device = argc >= 2 ? argv[1] : "/dev/sda";
12
13
if ((ret = sk_disk_open(device, &d)) < 0) {
14
g_printerr("Failed to open disk %s: %s\n", device, strerror(errno));
15
return 1;
16
}
17
18
sk_disk_dump(d);
19
20
sk_disk_free(d);
21
22
return 0;
23
}