summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-07-03 03:06:19 -0700
committerMichael Forney <mforney@mforney.org>2016-07-03 03:06:19 -0700
commit52b76cb615034dc8db23f3f76edcef8a150dd510 (patch)
tree8b4d5e5fb8c9b52a23d7c0143a7d5d73110beab6
parent1d3bcba154dca620bde5127ced121ea393e22255 (diff)
sbase: Fix ln -f option
-rw-r--r--core/sbase/.rev2
-rw-r--r--core/sbase/patch/0010-ln-Only-fail-if-same-inode-without-f-flag.patch31
2 files changed, 32 insertions, 1 deletions
diff --git a/core/sbase/.rev b/core/sbase/.rev
index 0cfbf088..00750edc 100644
--- a/core/sbase/.rev
+++ b/core/sbase/.rev
@@ -1 +1 @@
-2
+3
diff --git a/core/sbase/patch/0010-ln-Only-fail-if-same-inode-without-f-flag.patch b/core/sbase/patch/0010-ln-Only-fail-if-same-inode-without-f-flag.patch
new file mode 100644
index 00000000..4612bb27
--- /dev/null
+++ b/core/sbase/patch/0010-ln-Only-fail-if-same-inode-without-f-flag.patch
@@ -0,0 +1,31 @@
+From 8f22e7778c6bb5c43c69bf0035cfca3fa94957d4 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sun, 3 Jul 2016 03:04:16 -0700
+Subject: [PATCH] ln: Only fail if same inode without -f flag
+
+---
+ ln.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/ln.c b/ln.c
+index ab1ec4e..f62068a 100644
+--- a/ln.c
++++ b/ln.c
+@@ -77,9 +77,11 @@ main(int argc, char *argv[])
+ continue;
+ }
+ } else if (st.st_dev == tst.st_dev && st.st_ino == tst.st_ino) {
+- weprintf("%s and %s/%s are the same file\n",
+- *argv, targetdir, target);
+- ret = 1;
++ if (!fflag) {
++ weprintf("%s and %s/%s are the same file\n",
++ *argv, targetdir, target);
++ ret = 1;
++ }
+ continue;
+ }
+ }
+--
+2.9.0
+