Displaying 1 result from an estimated 1 matches for "loopro".
Did you mean:
loopo
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...== NULL)
+ return "";
+
+ pass[i] = 0;
+ return pass;
+}
+
+static int digits_only(const char *s)
+{
+ while (*s)
+ if (!isdigit(*s++))
+ return 0;
+ return 1;
+}
+
+int set_loop(const char *device, const char *file, unsigned long long offset,
+ const char *encryption, int pfd, int *loopro) {
+ struct loop_info64 loopinfo64;
+ int fd, ffd, mode, i;
+ char *pass;
+
+ mode = (*loopro ? O_RDONLY : O_RDWR);
+ if ((ffd = open(file, mode)) < 0) {
+ if (!*loopro && errno == EROFS)
+ ffd = open(file, mode = O_RDONLY);
+ if (ffd < 0) {
+ perror(file);
+ return 1;
+ }
+...