"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "looputils.c" between
cryptmount-5.3.1.tar.gz and cryptmount-5.3.2.tar.gz

About: cryptmount allows any user to access encrypted filing systems on demand under GNU/Linux systems. It also assists the system administrator in creating and managing encrypted filesystems based on the kernels dm-crypt device-mapper target.

looputils.c  (cryptmount-5.3.1):looputils.c  (cryptmount-5.3.2)
skipping to change at line 50 skipping to change at line 50
#ifdef HAVE_LINUX_LOOP_H #ifdef HAVE_LINUX_LOOP_H
# include <linux/loop.h> # include <linux/loop.h>
#else #else
# error loop.h kernel-header is needed to build cryptmount # error loop.h kernel-header is needed to build cryptmount
#endif #endif
#include <linux/major.h> #include <linux/major.h>
#include "cryptmount.h" #include "cryptmount.h"
#include "looputils.h" #include "looputils.h"
char *cm_strdup(const char *orig);
/** /**
* Format-strings for loopback devices, * Format-strings for loopback devices,
* covering legacy /dev/loop/0 style * covering legacy /dev/loop/0 style
* as well as current /dev/loop0 style. * as well as current /dev/loop0 style.
*/ */
static const char *loop_formats[] = { static const char *loop_formats[] = {
"/dev/loop%u", "/dev/loop/%u", NULL }; "/dev/loop%u", "/dev/loop/%u", NULL };
/** /**
* Search for vacant loopback device. * Search for vacant loopback device.
skipping to change at line 243 skipping to change at line 245
int eflag = ERR_NOERROR; int eflag = ERR_NOERROR;
if (filename == NULL || stat(filename, &sbuff) != 0) { if (filename == NULL || stat(filename, &sbuff) != 0) {
*isloop = 0; *isloop = 0;
eflag = ERR_BADDEVICE; eflag = ERR_BADDEVICE;
goto bail_out; goto bail_out;
} }
if (S_ISBLK(sbuff.st_mode)) { if (S_ISBLK(sbuff.st_mode)) {
/* Keyfile is block-special already: */ /* Keyfile is block-special already: */
*devname = filename; *devname = cm_strdup(filename);
*isloop = 0; *isloop = 0;
} else if (S_ISREG(sbuff.st_mode)) { } else if (S_ISREG(sbuff.st_mode)) {
/* Create loopback device around ordinary file: */ /* Create loopback device around ordinary file: */
if (prefdev != NULL && strcmp(prefdev, "auto") != 0) { if (prefdev != NULL && strcmp(prefdev, "auto") != 0) {
loopdev = (char*)malloc((size_t)(strlen(prefdev) + 1)); loopdev = (char*)malloc((size_t)(strlen(prefdev) + 1));
strcpy(loopdev, prefdev); strcpy(loopdev, prefdev);
} else { } else {
loopdev = (char*)malloc((size_t)BUFFMIN); loopdev = (char*)malloc((size_t)BUFFMIN);
if (loop_findfree(loopdev, (size_t)BUFFMIN) != 0) { if (loop_findfree(loopdev, (size_t)BUFFMIN) != 0) {
fprintf(stderr, _("No available loopback devices\n")); fprintf(stderr, _("No available loopback devices\n"));
 End of changes. 2 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)