"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mdopen.c" between
mdadm-4.1.tar.gz and mdadm-4.2.tar.gz

About: mdadm is a tool for creating, managing and monitoring device arrays using the "md" driver in Linux, also known as Software RAID arrays.

mdopen.c  (mdadm-4.1):mdopen.c  (mdadm-4.2)
skipping to change at line 123 skipping to change at line 123
fd = open(new_array_file, O_WRONLY); fd = open(new_array_file, O_WRONLY);
if (fd < 0 && errno == ENOENT) { if (fd < 0 && errno == ENOENT) {
if (system("modprobe md_mod") == 0) if (system("modprobe md_mod") == 0)
fd = open(new_array_file, O_WRONLY); fd = open(new_array_file, O_WRONLY);
} }
if (fd >= 0) { if (fd >= 0) {
n = write(fd, devnm, strlen(devnm)); n = write(fd, devnm, strlen(devnm));
close(fd); close(fd);
} }
if (fd < 0 || n != (int)strlen(devnm)) { if (fd < 0 || n != (int)strlen(devnm)) {
pr_err("Fail create %s when using %s\n", devnm, new_array_file); pr_err("Fail to create %s when using %s, fallback to creation via
node\n",
devnm, new_array_file);
return 0; return 0;
} }
return 1; return 1;
} }
/* /*
* We need a new md device to assemble/build/create an array. * We need a new md device to assemble/build/create an array.
* 'dev' is a name given us by the user (command line or mdadm.conf) * 'dev' is a name given us by the user (command line or mdadm.conf)
* It might start with /dev or /dev/md any might end with a digit * It might start with /dev or /dev/md any might end with a digit
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)