Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > main-updates-src > by-pkgid > 27fd89d2f8fc6166d9aeb3e78e998a76 > files > 11

util-linux-2.19-3.2.src.rpm

--- util-linux-2.19/mount/mount.c.autodav	2011-02-11 23:45:40.000000000 -0200
+++ util-linux-2.19/mount/mount.c	2011-02-11 23:45:52.000000000 -0200
@@ -1631,6 +1631,7 @@ try_mount_one (const char *spec0, const
   /*
    * Call mount.TYPE for types that require a separate mount program.
    * For the moment these types are ncpfs and smbfs. Maybe also vxfs.
+   * For the moment these types are ncpfs and smbfs and davfs. Maybe also vxfs.
    * All such special things must occur isolated in the types string.
    */
   if (check_special_mountprog(spec, node, types, flags, mount_opts, &status)) {
@@ -2004,7 +2005,12 @@ mount_one (const char *spec, const char
 	opts = append_opt(opts, cmdlineopts, NULL);
 
 	if (types == NULL && !mounttype && !is_existing_file(spec)) {
-		if (strchr (spec, ':') != NULL) {
+		if((!strncmp(spec, "http://", 7))||(!strncmp(spec, "https://", 8))) {
+			types = "davfs";
+			if (verbose)
+				printf(_("mount: no type was given - "
+					"I'll assume dav because of the http[s]:// prefix\n"));
+		} else if (strchr (spec, ':') != NULL) {
 			types = "nfs";
 			if (verbose)
 				printf(_("mount: no type was given - "