亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? log.c

?? About: Paco (pacKAGE oRGANIZER) is a simple, yet powerful tool to aid package management when insta
?? C
字號:
/*********************************************************************** * log.c: Handles the system calls that create files and logs them. *********************************************************************** * This file is part of the package paco * Copyright (C) 2004-2006 David Rosal <david.3r@gmail.com> * For more information visit http://paco.sourceforge.net ***********************************************************************/#include "config.h"#include <dirent.h>#include <dlfcn.h>#include <fcntl.h>			  #include <stdarg.h>#include <unistd.h>#define __have_64__  (HAVE_OPEN64 && HAVE_CREAT64 && HAVE_TRUNCATE64 \                      && HAVE_FOPEN64 && HAVE_FREOPEN64)#define CHECK_INIT  do { \	if (!lp_tmpfile) lp_init(); \} while (0)#define PACO_BUFSIZE  4096static int	(*libc_creat)		(const char*, mode_t);static int	(*libc_link)		(const char*, const char*);static int	(*libc_open)		(const char*, int, ...);static int	(*libc_rename)		(const char*, const char*);static int	(*libc_symlink)		(const char*, const char*);static int	(*libc_truncate)	(const char*, off_t);static FILE*(*libc_fopen)		(const char*, const char*);static FILE*(*libc_freopen)		(const char*, const char*, FILE*);#if __have_64__static int	(*libc_creat64)		(const char*, mode_t);static int	(*libc_open64)		(const char*, int, ...);static int	(*libc_truncate64)	(const char*, off64_t);static FILE*(*libc_fopen64)		(const char*, const char*);static FILE*(*libc_freopen64)	(const char*, const char*, FILE*);#endif  /* __have_64__ */static char*	lp_tmpfile;static int		lp_debug;static void lp_die(const char* fmt, ...){	va_list ap;		fflush(stdout);	fputs("libpaco-log: ", stderr);	va_start(ap, fmt);	vfprintf(stderr, fmt, ap);	va_end(ap);	putc('\n', stderr);		exit(EXIT_FAILURE);}static void* lp_dlsym(const char* symbol){	void* ret;	char* error;	dlerror();	if (!(ret = dlsym(RTLD_NEXT, symbol))) {		error = (char*)dlerror();		lp_die("dlsym(%p, \"%s\"): %s", RTLD_NEXT, symbol,			error ? error : "failed");	}	return ret;}		static void lp_init(){	static char* dbg = NULL;	/* handle libc */		libc_creat = lp_dlsym("creat");	libc_link = lp_dlsym("link");	libc_open = lp_dlsym("open");	libc_rename = lp_dlsym("rename");	libc_symlink = lp_dlsym("symlink");	libc_truncate = lp_dlsym("truncate");	libc_fopen = lp_dlsym("fopen");	libc_freopen = lp_dlsym("freopen");#if __have_64__	libc_open64 = lp_dlsym("open64");	libc_creat64 = lp_dlsym("creat64");	libc_truncate64 = lp_dlsym("truncate64");	libc_fopen64 = lp_dlsym("fopen64");	libc_freopen64 = lp_dlsym("freopen64");#endif  /* __have_64__ */	/* read the environment */		if (!lp_tmpfile && !(lp_tmpfile = getenv("PACO_TMPFILE")))		lp_die("variable %s undefined", "PACO_TMPFILE"); \			if (!dbg && (dbg = getenv("PACO_DEBUG")))		lp_debug = !strcmp(dbg, "yes");}static void lp_log(const char* path, const char* fmt, ...){	static char abs_path[PACO_BUFSIZE];	va_list a;	int fd, len, __errno = errno;		if (!strcmp(path, "/dev/tty") || !strcmp(path, "/dev/null") ||		!strncmp(path, "/proc/", 6))		goto ____end;	CHECK_INIT;	if (lp_debug) {		fflush(stdout);		fprintf(stderr, "paco :: ");		va_start(a, fmt);		vfprintf(stderr, fmt, a);		va_end(a);		putc('\n', stderr);	}		/* "Absolutize" relative paths */	if (path[0] == '/') {		strncpy(abs_path, path, PACO_BUFSIZE - 1);		abs_path[PACO_BUFSIZE - 1] = '\0';	}	else if (getcwd(abs_path, PACO_BUFSIZE)) {		strncat(abs_path, "/", PACO_BUFSIZE - strlen(abs_path) - 1);		strncat(abs_path, path, PACO_BUFSIZE - strlen(abs_path) - 1);	}	else		snprintf(abs_path, PACO_BUFSIZE, "./%s", path);	strncat(abs_path, "\n", PACO_BUFSIZE - strlen(abs_path) - 1);	if ((fd = libc_open(lp_tmpfile, O_WRONLY | O_CREAT | O_APPEND, 0644)) < 0)		lp_die("open(\"%s\"): %s", lp_tmpfile, strerror(errno));		len = strlen(abs_path);		if (write(fd, abs_path, len) != len)		lp_die("%s: write(): %s", lp_tmpfile, strerror(errno));			if (close(fd) < 0)		lp_die("close(%d): %s", fd, strerror(errno));	____end:	errno = __errno;}/************************//* System call handlers *//************************/FILE* fopen(const char* path, const char* mode){	FILE* ret;		CHECK_INIT;		ret = libc_fopen(path, mode);	if (ret && strpbrk(mode, "wa+"))		lp_log(path, "fopen(\"%s\", \"%s\")", path, mode);		return ret;}FILE* freopen(const char* path, const char* mode, FILE* stream){	FILE* ret;		CHECK_INIT;		ret = libc_freopen(path, mode, stream);	if (ret && strpbrk(mode, "wa+"))		lp_log(path, "freopen(\"%s\", \"%s\")", path, mode);		return ret;}/* * If NEWBUF isn't a directory write it to the log, otherwise log files it and * its subdirectories contain. */static void log_rename(const char* oldpath, const char* newpath){	char oldbuf[PACO_BUFSIZE], newbuf[PACO_BUFSIZE];	struct stat st;	DIR* dir;	struct dirent* e;	size_t oldlen, newlen;	int __errno = errno;	/* save global errno */	/* The NEWpath file doesn't exist.  */	if (-1 == lstat(newpath, &st)) 		goto ____end;	else if (!S_ISDIR(st.st_mode)) {		/* NEWpath is a file or a symlink.  */		lp_log(newpath, "rename(\"%s\", \"%s\")", oldpath, newpath);		goto ____end;	}	/* Make sure we have enough space for the following slashes.  */	oldlen = strlen(oldpath);	newlen = strlen(newpath);	if (oldlen + 2 >= PACO_BUFSIZE || newlen + 2 >= PACO_BUFSIZE)		goto ____end;	strcpy(oldbuf, oldpath);	strcpy(newbuf, newpath);	newbuf[PACO_BUFSIZE - 1] = oldbuf[PACO_BUFSIZE - 1] = '\0';	/* We can do this in the loop below, buf it's more efficient to do	   that once. These slashes will separate the path NEWBUF/OLDBUF	   contains from names of its files/subdirectories.  */	oldbuf[oldlen++] = newbuf[newlen++] = '/';	oldbuf[oldlen] = newbuf[newlen] = '\0';	dir = opendir(newbuf);	while ((e = readdir(dir))) {		if (!strcmp(e->d_name, ".") || !strcmp(e->d_name, ".."))			continue;		strncat(oldbuf, e->d_name, PACO_BUFSIZE - oldlen - 1);		strncat(newbuf, e->d_name, PACO_BUFSIZE - newlen - 1);		log_rename(oldbuf, newbuf);		oldbuf[oldlen] = newbuf[newlen] = '\0';	}	closedir(dir);____end:	/* Restore global errno */	errno = __errno;}int rename(const char* oldpath, const char* newpath){	int ret;		CHECK_INIT;		if ((ret = libc_rename(oldpath, newpath)) != -1)		log_rename(oldpath, newpath);	return ret;}int creat(const char* path, mode_t mode){	int ret;		CHECK_INIT;		ret = libc_open(path, O_CREAT | O_WRONLY | O_TRUNC, mode);		if (ret != -1)		lp_log(path, "creat(\"%s\", 0%o)", path, (int)mode);		return ret;}int link(const char* oldpath, const char* newpath){	int ret;		CHECK_INIT;		ret = libc_link(oldpath, newpath);		if (ret != -1)		lp_log(newpath, "link(\"%s\", \"%s\")", oldpath, newpath);		return ret;}int truncate(const char* path, off_t length){	int ret;		CHECK_INIT;		ret = libc_truncate(path, length);	if (ret != -1)		lp_log(path, "truncate(\"%s\", %d)", path, (int)length);		return ret;}int open(const char* path, int flags, ...){	va_list a;	mode_t mode;	int accmode, ret;		CHECK_INIT;		va_start(a, flags);	mode = va_arg(a, mode_t);	va_end(a);		ret = libc_open(path, flags, mode);	accmode = flags & O_ACCMODE;	if (ret != -1 && (accmode == O_WRONLY || accmode == O_RDWR))		lp_log(path, "open(\"%s\")", path);		return ret;}int symlink(const char* oldpath, const char* newpath){	int ret;		CHECK_INIT;		ret = libc_symlink(oldpath, newpath);	if (ret != -1)		lp_log(newpath, "symlink(\"%s\", \"%s\")", oldpath, newpath);		return ret;}#if __have_64__int creat64(const char* path, mode_t mode){	int ret;		CHECK_INIT;		ret = libc_open64(path, O_CREAT | O_WRONLY | O_TRUNC, mode);	if (ret != -1)		lp_log(path, "creat64(\"%s\")", path);		return ret;}int open64(const char* path, int flags, ...){	va_list a;	mode_t mode;	int accmode, ret;		CHECK_INIT;		va_start(a, flags);	mode = va_arg(a, mode_t);	va_end(a);		ret = libc_open64(path, flags, mode);	accmode = flags & O_ACCMODE;	if (ret != -1 && (accmode == O_WRONLY || accmode == O_RDWR))		lp_log(path, "open64(\"%s\")", path);			return ret;}int truncate64(const char* path, off64_t length){	int ret;		CHECK_INIT;		ret = libc_truncate64(path, length);	if (ret != -1)		lp_log(path, "truncate64(\"%s\", %d)", path, (int)length);		return ret;}FILE* fopen64(const char* path, const char* mode){	FILE* ret;		CHECK_INIT;		ret = libc_fopen64(path, mode);	if (ret && strpbrk(mode, "wa+"))		lp_log(path, "fopen64(\"%s\", \"%s\")", path, mode);		return ret;}FILE* freopen64(const char* path, const char* mode, FILE* stream){	FILE* ret;		CHECK_INIT;		ret = libc_freopen64(path, mode, stream);	if (ret && strpbrk(mode, "wa+"))		lp_log(path, "freopen64(\"%s\", \"%s\")", path, mode);		return ret;}#endif  /* __have_64__ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区av在线| 91在线视频18| 极品销魂美女一区二区三区| 午夜久久久影院| 亚洲国产日韩a在线播放性色| 亚洲欧美日韩国产中文在线| ㊣最新国产の精品bt伙计久久| 欧美国产欧美亚州国产日韩mv天天看完整| 久久久久久久精| 国产欧美精品一区二区色综合 | 国产成人av一区二区三区在线| 久久99精品国产麻豆不卡| 久久99久久久欧美国产| 国产一区二区三区在线观看免费视频| 精品无人区卡一卡二卡三乱码免费卡 | 亚洲欧美日韩成人高清在线一区| 亚洲天堂久久久久久久| 亚洲精品视频在线看| 一区二区日韩av| 日一区二区三区| 蜜桃av一区二区三区电影| 国产真实乱子伦精品视频| 国产精品亚洲第一| 91香蕉视频mp4| 欧美日韩免费电影| 欧美成人官网二区| 国产精品全国免费观看高清| 亚洲欧美乱综合| 日韩精品电影一区亚洲| 韩国精品久久久| 99国产精品国产精品久久| 欧美日韩国产高清一区二区| 日韩免费一区二区| 国产精品美女www爽爽爽| 亚洲综合另类小说| 久久精品国产99国产精品| 成人深夜在线观看| 欧美午夜宅男影院| 欧美xfplay| 中文字幕日韩欧美一区二区三区| 亚洲成人免费在线观看| 狠狠色丁香久久婷婷综| 91麻豆swag| 欧美成人性战久久| 亚洲男人的天堂在线aⅴ视频| 午夜欧美大尺度福利影院在线看| 加勒比av一区二区| 一本一本久久a久久精品综合麻豆| 欧美二区三区的天堂| 中文字幕第一区| 午夜精品一区二区三区三上悠亚| 国产在线播精品第三| 色欲综合视频天天天| 欧美tk丨vk视频| 亚洲激情图片一区| 国产一区二区三区美女| 色欧美片视频在线观看| 久久夜色精品国产噜噜av| 玉米视频成人免费看| 国产一区二区影院| 欧美色图天堂网| 中文字幕精品一区| 奇米影视7777精品一区二区| 99re免费视频精品全部| 欧美一区二区三区喷汁尤物| 亚洲免费av在线| 国产成人av资源| 欧美一区二区三区日韩| 亚洲欧美国产高清| 高清不卡一区二区在线| 欧美一级艳片视频免费观看| 亚洲精品少妇30p| 懂色av一区二区在线播放| 日韩亚洲欧美中文三级| 夜夜嗨av一区二区三区网页 | 欧美性色综合网| 国产精品久久久久久久裸模| 国产一区在线观看麻豆| 在线播放视频一区| 一区二区三区精品视频在线| 高清shemale亚洲人妖| 精品对白一区国产伦| 日韩av不卡一区二区| 91久久精品国产91性色tv| 国产精品亲子伦对白| 国产一区二区三区四区五区入口| 欧美一区二区美女| 天天综合天天做天天综合| 91传媒视频在线播放| 亚洲图片你懂的| 不卡的av在线| 国产精品福利一区二区| 国产电影精品久久禁18| 久久这里只有精品6| 久久精品国产一区二区三区免费看 | 另类调教123区| 在线91免费看| 日本午夜精品视频在线观看| 色综合久久久久综合99| 一色屋精品亚洲香蕉网站| 99天天综合性| 中文字幕佐山爱一区二区免费| 成人免费高清在线观看| 国产精品丝袜在线| 国产精品一区二区久久不卡 | 欧美videos中文字幕| 狠狠色综合播放一区二区| 日韩美女视频一区二区在线观看| 香蕉久久一区二区不卡无毒影院 | 亚洲精品免费在线播放| 色综合一区二区三区| 亚洲欧美另类图片小说| 色吧成人激情小说| 亚洲一区二区三区四区五区中文| 欧美色窝79yyyycom| 日韩精品一二区| 欧美一区二区三区四区五区| 久久国产精品无码网站| 2017欧美狠狠色| 成人一区二区在线观看| 中文字幕在线视频一区| 一本高清dvd不卡在线观看| 艳妇臀荡乳欲伦亚洲一区| 欧美在线免费播放| 日本欧美肥老太交大片| 26uuu亚洲综合色| 国产成人免费视频精品含羞草妖精| 久久久久久久久99精品| 91在线码无精品| 一区二区三区四区激情| 欧美一区二区三区色| 国产精品一区一区| √…a在线天堂一区| 欧美中文字幕一区二区三区 | 精品在线观看免费| 中文字幕巨乱亚洲| 在线一区二区视频| 另类成人小视频在线| 国产亚洲欧美在线| 色哟哟日韩精品| 麻豆91精品91久久久的内涵| 国产女主播一区| 在线免费观看一区| 捆绑紧缚一区二区三区视频| 国产精品久久久久久户外露出| 精品视频色一区| 国产激情精品久久久第一区二区| 亚洲天堂中文字幕| 欧美一级黄色片| 99re这里只有精品视频首页| 日本成人超碰在线观看| 一色桃子久久精品亚洲| 欧美一区二区三区在线观看| av在线不卡电影| 日本成人在线看| 亚洲视频每日更新| 欧美大片拔萝卜| 色婷婷香蕉在线一区二区| 精彩视频一区二区三区| 一二三四区精品视频| 日本一区二区三区电影| 欧美精品丝袜久久久中文字幕| 国产成人一区二区精品非洲| 婷婷六月综合网| 中文字幕一区二区三区乱码在线| 日韩欧美高清一区| 在线免费不卡电影| 国产成人激情av| 久久精品国产成人一区二区三区| 亚洲人快播电影网| 久久美女艺术照精彩视频福利播放| 欧美午夜在线观看| 97久久精品人人爽人人爽蜜臀| 久久91精品久久久久久秒播| 亚洲午夜精品在线| 国产精品女主播av| 26uuu精品一区二区三区四区在线| 欧美午夜片在线观看| 成人丝袜18视频在线观看| 极品少妇xxxx偷拍精品少妇| 午夜影院在线观看欧美| 亚洲欧美另类图片小说| 国产三级久久久| 欧美不卡视频一区| 91精品免费在线观看| 欧美综合一区二区三区| 成人av在线电影| 国产丶欧美丶日本不卡视频| 麻豆一区二区在线| 天天av天天翘天天综合网| 一区二区在线观看视频在线观看| 国产精品系列在线| 26uuu精品一区二区| 日韩欧美高清在线| 日韩欧美不卡在线观看视频| 在线播放91灌醉迷j高跟美女| 欧美日韩在线播| 欧美色图一区二区三区| 欧美专区日韩专区| 日本韩国欧美在线|