FreeBSD Bugzilla – Attachment 5484 Details for
Bug 13071
link(1) as required by Unix 98
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 4.09 KB, created by
howardjp
on 1999-08-11 13:30:02 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
howardjp
Created:
1999-08-11 13:30:02 UTC
Size:
4.09 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># Makefile ># link.1 ># link.c ># >echo x - Makefile >sed 's/^X//' >Makefile << 'END-of-Makefile' >XPROG= link >X >X.include <bsd.prog.mk> >END-of-Makefile >echo x - link.1 >sed 's/^X//' >link.1 << 'END-of-link.1' >X.\" Copyright (c) 1999 James Howard >X.\" All rights reserved. >X.\" >X.\" Redistribution and use in source and binary forms, with or without >X.\" modification, are permitted provided that the following conditions >X.\" are met: >X.\" 1. Redistributions of source code must retain the above copyright >X.\" notice, this list of conditions and the following disclaimer. >X.\" 2. Redistributions in binary form must reproduce the above copyright >X.\" notice, this list of conditions and the following disclaimer in the >X.\" documentation and/or other materials provided with the distribution. >X.\" >X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >X.\" SUCH DAMAGE. >X.\" >X.\" >X.\" $Id$ >X.\" >X.Dd August 10, 1999 >X.Dt LINK 1 >X.Os >X.Sh NAME >X.Nm link >X.Nd call the >X.Xr link 2 >Xfunction >X.Sh SYNOPSIS >X.Nm link >X.Ar file1 file2 >X.Sh DESCRIPTION >XThe >X.Nm >Xutility calls >X.Xr link 2 >Xwith the arguments >X.Ar file2 >Xand >X.Ar file1 . >X.Sh USAGE >X.Nm Link >Xcreates a hard link from the source file >X.Ar file1 >Xdestination file >X.Ar file2 . >X.Sh SEE ALSO >X.Xr ln 1 , >X.Xr unlink 1 , >X.Xr link 2 , >X.Xr unlink 2 >X.Sh STANDARDS >XThe >X.Nm >Xutility is expected to be >XXPG5 >Xcompliant.END-of-link.1 >echo x - link.c >sed 's/^X//' >link.c << 'END-of-link.c' >X/*- >X * Copyright (c) 1999 James Howard >X * All rights reserved. >X * >X * Redistribution and use in source and binary forms, with or without >X * modification, are permitted provided that the following conditions >X * are met: >X * 1. Redistributions of source code must retain the above copyright >X * notice, this list of conditions and the following disclaimer. >X * 2. Redistributions in binary form must reproduce the above copyright >X * notice, this list of conditions and the following disclaimer in the >X * documentation and/or other materials provided with the distribution. >X * >X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >X * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >X * SUCH DAMAGE. >X * >X * $Id$ >X */ >X >X#include <err.h> >X#include <stdio.h> >X#include <unistd.h> >X >Xvoid help(void); >X >Xint main(int argc, char **argv) >X{ >X int e; >X >X if(argc != 3) >X help(); >X >X if((e = link(argv[1], argv[2])) != 0) >X err(!e, "%s", argv[1]); >X >X return 0; >X} >X >Xvoid help(void) >X{ >X >X fprintf(stderr, "usage: link file1 file2\n"); >X exit(1); >X} >END-of-link.c >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13071
: 5484