openbsd-ports/x11/kde/libs3/patches/patch-kioslave_file_file_cc

38 lines
1.7 KiB
Plaintext

$OpenBSD: patch-kioslave_file_file_cc,v 1.3 2007/03/31 23:33:34 espie Exp $
--- kioslave/file/file.cc.orig Fri Mar 17 11:19:07 2006
+++ kioslave/file/file.cc Sat Mar 31 15:09:22 2007
@@ -193,9 +193,11 @@ void FileProtocol::chmod( const KURL& url, int permiss
case EACCES:
error( KIO::ERR_ACCESS_DENIED, url.path() );
break;
+#if defined(ENOTSUP)
case ENOTSUP:
error( KIO::ERR_UNSUPPORTED_ACTION, url.path() );
break;
+#endif
case ENOSPC:
error( KIO::ERR_DISK_FULL, url.path() );
break;
@@ -1445,6 +1447,9 @@ void FileProtocol::mount( bool _ro, const char *_fstyp
dev.data()
point.data()
tmp );
+#elif defined(__OpenBSD__)
+ buffer.sprintf( "%s %s %s -t %s %s %s 2>%s", "kdesu", mountProg.latin1(), readonly.data(),
+ fstype.data(), dev.data(), point.data(), tmp );
#else
buffer.sprintf( "%s %s -t %s %s %s 2>%s", mountProg.latin1(), readonly.data(),
fstype.data(), dev.data(), point.data(), tmp );
@@ -1604,7 +1609,11 @@ void FileProtocol::unmount( const QString& _point )
error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\""));
return;
}
+#ifdef __OpenBSD__
+ buffer.sprintf( "%s %s %s 2>%s", "kdesu", umountProg.latin1(), QFile::encodeName(KProcess::quote(_point)).data(), tmp );
+#else
buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), QFile::encodeName(KProcess::quote(_point)).data(), tmp );
+#endif
system( buffer.data() );
#endif /* HAVE_VOLMGT */