summaryrefslogtreecommitdiff
path: root/misc/kdeutils3/patches/patch-ai
diff options
context:
space:
mode:
Diffstat (limited to 'misc/kdeutils3/patches/patch-ai')
-rw-r--r--misc/kdeutils3/patches/patch-ai197
1 files changed, 197 insertions, 0 deletions
diff --git a/misc/kdeutils3/patches/patch-ai b/misc/kdeutils3/patches/patch-ai
new file mode 100644
index 00000000000..7fe5e568bc0
--- /dev/null
+++ b/misc/kdeutils3/patches/patch-ai
@@ -0,0 +1,197 @@
+$NetBSD: patch-ai,v 1.1.1.1 2002/05/31 13:42:36 skrll Exp $
+
+--- kfloppy/floppy.cpp.orig Wed May 8 19:31:38 2002
++++ kfloppy/floppy.cpp
+@@ -211,64 +211,114 @@
+ {
+ if( deviceComboBox->currentText() == i18n("Primary") ){
+ if( densityComboBox->currentText() == i18n("3.5\" 1.44MB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd0b";
++ tracks = 160;
++#else
+ device = "/dev/fd0H1440";
+- blocks = 1440;
+ tracks = 80;
++#endif
++ blocks = 1440;
++#ifndef __NetBSD__
+ if( access(QFile::encodeName(device),W_OK) < 0){
+ device = "/dev/fd0u1440";
+ }
++#endif
+ }
+ else
+ if( densityComboBox->currentText() == i18n("3.5\" 720KB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd0f";
++ tracks = 160;
++#else
+ device = "/dev/fd0D720";
+- blocks = 720;
+ tracks = 80;
++#endif
++ blocks = 720;
++#ifndef __NetBSD__
+ if( access(QFile::encodeName(device),W_OK) < 0){
+ device = "/dev/fd0u720";
+ }
++#endif
+ }
+ else
+ if( densityComboBox->currentText() == i18n("5.25\" 1.2MB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd0c";
++ tracks = 160;
++ blocks = 1200;
++#else
+ device = "/dev/fd0h1200";
+ blocks = 720;
+ tracks = 80;
++#endif
+ }
+ else
+ if( densityComboBox->currentText() == i18n("5.25\" 360KB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd0g";
++ tracks = 160;
++#else
+ device = "/dev/fd0h360";
+- blocks = 720;
+ tracks = 80;
++#endif
++ blocks = 720;
+ }
+ }
+ if( deviceComboBox->currentText() == i18n("Secondary") ){
+ if( densityComboBox->currentText() == i18n("3.5\" 1.44MB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd1b";
++ tracks = 160;
++#else
+ device = "/dev/fd1H1440";
+- blocks = 1440;
+ tracks = 80;
++#endif
++ blocks = 1440;
++#ifndef __NetBSD__
+ if( access(QFile::encodeName(device),W_OK) < 0){
+- device = "/dev/fd1u1440";
++ device = "/dev/fd0u1440";
+ }
++#endif
+ }
+ else
+ if( densityComboBox->currentText() == i18n("3.5\" 720KB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd1f";
++ tracks = 160;
++#else
+ device = "/dev/fd1D720";
+- blocks = 720;
+ tracks = 80;
++#endif
++ blocks = 720;
++#ifndef __NetBSD__
+ if( access(QFile::encodeName(device),W_OK) < 0){
+ device = "/dev/fd1u720";
+ }
++#endif
+ }
+ else
+ if( densityComboBox->currentText() == i18n("5.25\" 1.2MB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd1c";
++ tracks = 160;
++ blocks = 1200;
++#else
+ device = "/dev/fd1h1200";
+ blocks = 720;
+ tracks = 80;
++#endif
+ }
+ else
+ if( densityComboBox->currentText() == i18n("5.25\" 360KB")){
++#ifdef __NetBSD__
++ device = "/dev/rfd1g";
++ tracks = 160;
++#else
+ device = "/dev/fd1h360";
+- blocks = 720;
+ tracks = 80;
++#endif
++ blocks = 720;
+ }
+ }
+
+@@ -294,16 +344,22 @@
+ path.append(":/usr/sbin:/sbin");
+
+ fdformat = KGlobal::dirs()->findExe("fdformat", path);
++#ifndef __NetBSD__
+ mke2fs = KGlobal::dirs()->findExe("mke2fs", path);
+ mkdosfs = KGlobal::dirs()->findExe("mkdosfs", path);
++#else
++ mkdosfs = KGlobal::dirs()->findExe("newfs_msdos", path);
++#endif
+ QString str = "";
+ if (fdformat.isEmpty()) {
+ str = i18n("Cannot find fdformat.");
+ }
+
++#ifndef __NetBSD__
+ if (mke2fs.isEmpty()) {
+ str = i18n("Cannot find mke2fs");
+ }
++#endif
+
+ if (mkdosfs.isEmpty()) {
+ str = i18n("Cannot find mkdosfs");
+@@ -416,6 +472,9 @@
+ if (!verifylabel->isChecked()) {
+ *proc << "-n";
+ }
++#ifdef __NetBSD__
++ *proc << "-f";
++#endif
+ *proc << device;
+
+ connect(proc, SIGNAL(processExited(KProcess *)),this, SLOT(formatdone(KProcess*)));
+@@ -433,7 +492,10 @@
+ KMessageBox::error(this, str);
+ reset();
+ }
+-}
++#ifdef __NetBSD__
++ proc->writeStdin("y\n", 2);
++#endif
++}
+ }
+ }
+
+@@ -740,12 +802,17 @@
+
+ *proc << mkdosfs;
+ if(labellabel->isChecked())
++#ifdef __NetBSD__
++ *proc << "-L" <<lineedit->text();
++#else
+ *proc << "-n" <<lineedit->text();
+ if (verifylabel->isChecked()) {
+ *proc << "-c";
+ }
++#endif
+ *proc << device;
+ }
++#ifndef __NetBSD__
+ else{
+
+ *proc << mke2fs;
+@@ -757,6 +824,7 @@
+ }
+ *proc << device;
+ }
++#endif
+
+
+