chiark / gitweb /
keymap: Fix rfkill button on Hewlett-Packard HP ProBook
[elogind.git] / src / extras / mtd_probe / mtd_probe.c
index e45867ffa9557dc003c36606f6213d548f2e49fc..1aa08d3851a5d642e380a740b9fefcfd05b36a2e 100644 (file)
 
 int main(int argc, char** argv)
 {
-       if (argc != 2) {
-               printf("usage: mtd_probe /dev/mtd[n]\n");
-               return 1;
-       }
+        if (argc != 2) {
+                printf("usage: mtd_probe /dev/mtd[n]\n");
+                return 1;
+        }
 
-       int mtd_fd = open(argv[1], O_RDONLY);
-       if (mtd_fd == -1) {
-               perror("open");
-               exit(-1);
-       }
+        int mtd_fd = open(argv[1], O_RDONLY);
+        if (mtd_fd == -1) {
+                perror("open");
+                exit(-1);
+        }
 
-       mtd_info_t mtd_info;
-       int error = ioctl(mtd_fd, MEMGETINFO, &mtd_info);
-       if (error == -1) {
-               perror("ioctl");
-               exit(-1);
-       }
+        mtd_info_t mtd_info;
+        int error = ioctl(mtd_fd, MEMGETINFO, &mtd_info);
+        if (error == -1) {
+                perror("ioctl");
+                exit(-1);
+        }
 
-       probe_smart_media(mtd_fd, &mtd_info);
-       return -1;
+        probe_smart_media(mtd_fd, &mtd_info);
+        return -1;
 }