Displaying 2 results from an estimated 2 matches for "proc_partitions".
Did you mean:
  crc_partitions
  
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
...se{
+			res = 1;	/* if match, the device is ok */
+		}
+
+		if( !fnmatch(rule, dev, 0 ) )
+			return res;
+
+	}
+	return 1;
+}
+
+int btrfs_scan_block_devices(int run_ioctl, int checklist)
+{
+
+	struct stat st;
+	int ret;
+	int fd;
+	struct btrfs_fs_devices *tmp_devices;
+	u64 num_devices;
+	FILE *proc_partitions;
+	int i;
+	char buf[1024];
+	char name[100], fullpath[110];
+
+	if(checklist)
+		init_device_checklist(BTRFSDEVICELIST);
+
+	proc_partitions = fopen("/proc/partitions","r");
+	if (!proc_partitions) {
+		fprintf(stderr, "Unable to open ''/proc/partitions'' f...
2013 Mar 21
4
[PATCH] btrfs-progs: make btrfs dev scan multi path aware
...+
+		fd = open(fullpath, O_RDONLY);
 		ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices,
 					    &num_devices,
 					    BTRFS_SUPER_INFO_OFFSET);
+		close(fd);
 		if (ret == 0 && run_ioctl > 0) {
 			btrfs_register_one_device(fullpath);
 		}
-		close(fd);
 	}
 
 	fclose(proc_partitions);
-- 
1.8.1.227.g44fe835
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html