kldxref.c (161004) | kldxref.c (185475) |
---|---|
1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/usr.sbin/kldxref/kldxref.c 161004 2006-08-05 18:22:11Z imp $ | 32 * $FreeBSD: head/usr.sbin/kldxref/kldxref.c 185475 2008-11-30 14:20:08Z luigi $ |
33 */ 34 35#include <sys/types.h> 36#include <sys/param.h> 37#include <sys/exec.h> 38#include <sys/queue.h> 39#include <sys/kernel.h> 40#include <sys/reboot.h> --- 220 unchanged lines hidden (view full) --- 261 strlcpy(dest, root, MAXPATHLEN); 262 263 if ((p = strrchr(dest, '/')) != 0) 264 p++; 265 else 266 p = dest; 267 strcpy(p, "lhint.XXXXXX"); 268 fd = mkstemp(dest); | 33 */ 34 35#include <sys/types.h> 36#include <sys/param.h> 37#include <sys/exec.h> 38#include <sys/queue.h> 39#include <sys/kernel.h> 40#include <sys/reboot.h> --- 220 unchanged lines hidden (view full) --- 261 strlcpy(dest, root, MAXPATHLEN); 262 263 if ((p = strrchr(dest, '/')) != 0) 264 p++; 265 else 266 p = dest; 267 strcpy(p, "lhint.XXXXXX"); 268 fd = mkstemp(dest); |
269 if (fd >= 0) 270 fchmod(fd, 0644); /* nothing secret in the file */ |
|
269 return ((fd == -1) ? NULL : fdopen(fd, "w+")); 270} 271 272static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; 273 274int 275main(int argc, char *argv[]) 276{ --- 87 unchanged lines hidden --- | 271 return ((fd == -1) ? NULL : fdopen(fd, "w+")); 272} 273 274static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; 275 276int 277main(int argc, char *argv[]) 278{ --- 87 unchanged lines hidden --- |