1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
4 This file is part of libatasmart.
6 Copyright 2008 Lennart Poettering
8 libatasmart is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as
10 published by the Free Software Foundation, either version 2.1 of the
11 License, or (at your option) any later version.
13 libatasmart is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with libatasmart. If not, If not, see
20 <http://www.gnu.org/licenses/>.
29 int main(int argc, char *argv[]) {
35 fprintf(stderr, "%s [DEVICE]\n", argv[0]);
41 if ((ret = sk_disk_open(device, &d)) < 0) {
42 fprintf(stderr, "Failed to open disk %s: %s\n", device, strerror(errno));
46 if ((ret = sk_disk_dump(d)) < 0) {
47 fprintf(stderr, "Failed to dump disk data: %s\n", strerror(errno));