You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.8 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../embutils/xx-readlink.patch
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
A tiny readlink I need (advanced features of the installer).
- Rene Rebe <rene@exactcode.de>
--- ./Makefile.orig 2007-03-28 00:46:09.000000000 -0400
+++ ./Makefile 2007-03-28 00:46:49.000000000 -0400
@@ -12,7 +12,7 @@
domainname id ln mv cp yes which cat rm wc ls whoami mkfifo head install \
sosrm soscp sosmv sosln soslns md5sum sleep2 allinone uniq tr mesg du \
uuencode uudecode nohup nice cmp mktemp truncate strings test date \
-printenv chrootuid renice free losetup switch_root
+printenv chrootuid renice free losetup switch_root readlink
OS:=$(shell uname)
ifeq ($(OS),Linux)
diff -urN embutils-0.17/readlink.c embutils-0.17-patched/readlink.c
--- embutils-0.17/readlink.c 1970-01-01 01:00:00.000000000 +0100
+++ embutils-0.17-patched/readlink.c 2005-12-19 00:13:23.000000000 +0100
@@ -0,0 +1,19 @@
+
+#include <unistd.h>
+#include <limits.h>
+
+int main(int argc,char *argv[]) {
+
+ char buf[PATH_MAX];
+ int i;
+
+ for (i=1; i<argc && i == 1; ++i) {
+ int n;
+ if (n = readlink(argv[i], buf, sizeof(buf))) {
+ write(1,buf,n);
+ write(1,"\n",1);
+ return 0;
+ }
+ }
+ return 11;
+}