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

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

?? archive.c

?? Linux系統備份源代碼 可基于用戶自定義策略實現系統、應用數據備份
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************    file                 : archive.c    begin                : Sat Jan 29 2000    copyright            : (C) 2000 by Henrik Witt-Hansen    email                : bean@daisy.net ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it 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.                                   * *                                                                         * ***************************************************************************//*base configuration*/#ifdef HAVE_CONFIG_H#include <config.h>#endif/*standard includes*/#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>/*local headers*/#include "sitback.h"/*special includes*/#include <sys/stat.h>#include <unistd.h>#include <dirent.h>#include <time.h>#include <pthread.h>#include <signal.h>#include <sys/wait.h>#include <errno.h>/*used by the __stat_location function*/extern int errno;/*local prototypes*/int __stat_location(char *filename,FILE *archivelist,FILE *excludelist,int descend,ino_t stop_ino,dev_t stop_dev);int __write_archiveid();/********************************************************************	  int ArchiveList()  Make a total list of what will be in the archive.  This makes searching and partial restore more  quick and easy.  arguments:    none  return:    -1 on error    0 on success********************************************************************/int ArchiveList(){  FILE *archivelist,*excludelist;  char strn[1024];  pthread_t tracker=0;  /*reset the size counter so that daemon's will not add to the total    sum each time the run, and reset the bad symlinks flag */  conf__archive_size=0;  conf__bad_symlinks=0;  /*Sometime we dont have any files to backup, f.ex. when setting new    archive id on an empty tape. Just create an empty archivelist*/  if(conf__filelist==NULL)  {    if((archivelist=fopen("sitback.archivelist","w"))==NULL)    {      errcode=15;      sprintf(strn,"Unable to open sitback.archivelist. Check permissions\n");      UI__Warning(strn);      return -1;    }    fprintf(archivelist,"\n");    fclose(archivelist);    return 0;  }  /*make sure we are at the beginning of the filelist*/  while(conf__filelist->prev!=NULL)    conf__filelist=conf__filelist->prev;  /*open the archive-list file*/  if((archivelist=fopen("sitback.archivelist","w"))==NULL)  {    errcode=15;    sprintf(strn,"Unable to open sitback.archivelist. Check permissions\n");    UI__Warning(strn);    return -1;  }  /* Open and initialize exclude list */  if((excludelist=fopen("sitback.excludelist","w"))==NULL)  {    errcode=60;    UI__Warning("Unable to open sitback.excludelist. Check permissions\n");    fclose(archivelist);    return -1;  }  fprintf(excludelist,"%s/sitback.debug\n",conf__homedir);  fprintf(excludelist,"%s/sitback.config-debug\n",conf__homedir);  fprintf(excludelist,"%s/sitback.report\n",conf__homedir);  fprintf(excludelist,"%s/sitback.archivelist\n",conf__homedir);  fprintf(excludelist,"%s/*.chk\n",conf__homedir);  fprintf(excludelist,"%s/sitback.excludelist\n",conf__homedir);  fprintf(excludelist,"%s/sitback.tmpout\n",conf__homedir);  fprintf(excludelist,"%s/sitback.archivename\n",conf__homedir);  fprintf(excludelist,"%s/sitback.archiveid\n",conf__homedir);  fprintf(excludelist,"%s/sitback.log\n",conf__homedir);  fprintf(excludelist,"%s/sitback.tmpin\n",conf__homedir);  fprintf(excludelist,"%s/sitback.tmperr\n",conf__homedir);  fprintf(excludelist,"%sarchive.tar\n",conf__temp);  fprintf(excludelist,"%sarchive.tar.gz\n",conf__temp);  fprintf(excludelist,"%sarchive.tar.bz2\n",conf__temp);  fprintf(excludelist,"%sarchive.tar.Z\n",conf__temp);  fprintf(excludelist,"%sarchive.tar.zip\n",conf__temp);  fprintf(excludelist,"%sarchive.zip\n",conf__temp);  fprintf(excludelist,"%ssitback.iso\n",conf__temp);  /*now generate the archive-list*/  unlink("sitback.tmpout");  pthread_create(&tracker,NULL,UI__TrackStdout,NULL); /* track verbose output */  UI__SetProgressText("                                                            ");  while(conf__filelist!=NULL)  {    /*recursively check this location*/    debug("Checking location \"%s\"\n",conf__filelist->target);    if(__stat_location(conf__filelist->target,archivelist,excludelist,1,0,0)==-1)    {      errcode=13;      debug("location '%s' failed\n",conf__filelist->target);      fclose(archivelist);      fclose(excludelist);      if(!pthread_kill(tracker,0))  /* stop tracking output */      {        pthread_cancel(tracker);        pthread_join(tracker,NULL);      }      UI__SetProgressText("                                                            ");      return -1;    }    debug("Done, checking that location\n");    /*next location*/    if(conf__filelist->next!=NULL)      conf__filelist=conf__filelist->next;    else      break;    debug("One more location\n");  }  debug("No more locations to check\n");  /* Stop tracking output */  debug("tracker=%d\n",tracker);  if(!pthread_kill(tracker,0))  {    debug("Killing tracker\n");    pthread_cancel(tracker);    pthread_join(tracker,NULL);  }  UI__SetProgressText("                                                            ");  /* add exclude files from the command line */  debug("Adding excludefiles from command line\n");  if(conf__exclude_files!=NULL)    fprintf(excludelist,"%s\n",conf__exclude_files);  /*close the list-files*/  fclose(archivelist);  fclose(excludelist);  /* Report bad symlinks, if any */  debug("Any bad symlinks ??\n");  if(conf__bad_symlinks)  {    debug("Yep...\n");    UI__Warning("Bad symlinks found. Check the report\n");  }  /*no problems*/  debug("ArchiveList() done\n");  return 0;}/********************************************************************  int __stat_location(char *filename)  recursively check location  arguments:    filename:    starting location    archivelist: filepointer to open archive-list file. Can be                 NULL if the directory or file is just to be                 tested..    excludelist; filepointer to open exclude-list file. Can be                 NULL if the directory or file is just to be                 tested    descend:     if set to 0, dont descend into subdirs.    stop_ino;    stop and return error if this inode is reached.                 (for looping symlink detection)    stop_dev;    stop_ino belongs to this device  return:    -1 on error    0 on success********************************************************************/int __stat_location(char *filename,FILE *archivelist,FILE *excludelist,int descend,ino_t stop_ino,dev_t stop_dev){  char *location;  unsigned int location_length=1024;  struct stat info,linfo;  DIR *dir;  struct dirent *entry;  char strn[1024];  int know_this_is_symlink=0;  char *start,*end;  FILE *file;  char linkpath[4096];  char tmp_linkpath[4096];  char *p;  /* entering __stat_location() */  debug("__stat_location called on \"%s\"\n",filename);  /* Do not check the locations stated in the exclude list */  if(conf__exclude_files!=NULL)  {    debug("Checking location against exclude list\n");    start=conf__exclude_files;    do    {      /* find end of string */      end=start;      while(*end!='\n' && *end!='\0')        end++;      /* check location */      if(strlen(filename)==end-start)  /* only if lenghts is equal */      {        if(!memcmp(filename,start,strlen(filename)))        {          debug("location is included in the exclude list..  skipping\n");          return 0;        }      }      /* next entry */      start=end;      while(*start=='\n')        start++;    }    while(*start!='\0');  }  /* special cases... */  if(!strcmp(filename,"/dev/fd"))  {    debug("Returning since /dev/fd is an infinite loop\n");    fprintf(excludelist,"%s\n",filename);  /*filesize of -1 indicates an error*/    return 0;  }  /* if we are generating the archivelist, dump the filenames     to sitback.tmpout to allow tracking */  if(archivelist!=NULL)  {    if((file=fopen("sitback.tmpout","a"))!=NULL)    {      fprintf(file,"%s\n",filename);      fclose(file);    }  }  /*get info on the initial filename*/  #ifdef HAVE_STAT64  if((stat64(filename,&info))==-1)  #else  if((stat(filename,&info))==-1)  #endif  {    if( errno==EOVERFLOW )    {      debug("OVERFLOW %u %u\n",info.st_blksize,info.st_blocks);    }    debug("unable to stat \"%s\". \"%s\"\n",filename,strerror(errno));    debug("__stat_location return from \"%s\"\n",filename);    /*This error might be due to a bad symlink (link without source). We have to      check for this, since this would make it a sanity problem, not a hard-problem      with the file-system..  Tar just skips by these bad links, so no reason      to make problems about this...*/    #ifdef HAVE_LSTAT64    if((lstat64(filename,&info))==-1)    #else    if((lstat(filename,&info))==-1)    #endif    {      /* weird case..  looping symlinks. */      if(errno==ENAMETOOLONG)      {        UI__Warning("Filename too long.. possibly a looping symlink..\n");        if(strlen(filename)>128)        {          strcpy(&filename[128],"...");          UI__Warning("File is (truncated) '%s'\n",filename);        }        else          UI__Warning("File is '%s'\n",filename);        return -1;      }      /* Access problem ?? */      if(access(filename,R_OK))      {        UI__Warning("Bad permissions or dead link. '%s'\n",filename);        return -1;      }      /* Nope. this is really a problem.         write this bad entry into the archive-list and        include it in the exclude list */      UI__Warning("Bad location '%s'\n",filename);      log("Unable to stat location '%s'. Error '%s'",filename,strerror(errno));      return -1;    }    else    {      /* If we are checking a looping symlink, skip the output noise,         we might encounter a bad symlink error when a loop gets         too long, but this still has to be reported only as a         looping symlink, so the user do not get confused */      if(stop_ino==0 && stop_dev==0)      {        log("Bad symlink '%s'",filename);        Report("Bad symlink '%s'\n",filename);      }      if(archivelist!=NULL)        fprintf(archivelist,"%s,%ld\n",filename,info.st_size);      if(excludelist!=NULL)        fprintf(excludelist,"%s\n",filename);      if(conf__ignore_bad_symlinks==0)      {        UI__Warning("Bad symlink found '%s'\n",filename);        return -1;      }      else        conf__bad_symlinks=1;      /* Symlink is ignored */      return 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久婷婷一区二区三区| 成人精品在线视频观看| 欧美刺激脚交jootjob| av一二三不卡影片| 午夜成人免费电影| 国产精品网站在线观看| 欧美午夜不卡在线观看免费| 亚洲精品大片www| 久久久一区二区| 欧美性色黄大片| 国产91丝袜在线播放九色| 亚洲一区二三区| 日韩精品一区二区三区中文不卡 | 国产日韩一级二级三级| 成人综合在线网站| 一区二区三区欧美| 国产精品色在线| 91精品国产综合久久精品app| 91色|porny| 国产一区二区看久久| 亚洲免费大片在线观看| 久久久久亚洲蜜桃| 99久久精品国产麻豆演员表| 国产一本一道久久香蕉| 香蕉乱码成人久久天堂爱免费| 亚洲人成亚洲人成在线观看图片| 日韩精品一区二区三区视频| 麻豆精品精品国产自在97香蕉| 亚洲综合精品自拍| 国产目拍亚洲精品99久久精品| 日韩午夜电影在线观看| 91年精品国产| 国产传媒一区在线| 美女一区二区视频| 亚洲国产精品久久一线不卡| 日韩毛片高清在线播放| 久久精品在这里| 久久这里只精品最新地址| 欧美男男青年gay1069videost | 5566中文字幕一区二区电影| 欧美色偷偷大香| 国产经典欧美精品| 国产精品影视在线观看| 人人狠狠综合久久亚洲| 亚洲欧美偷拍三级| 一区二区三区精品视频在线| 中文字幕中文在线不卡住| 亚洲欧洲国产日韩| 国产精品网曝门| 国产精品国产自产拍在线| 久久久99久久| 精品电影一区二区三区| 久久免费偷拍视频| 精品乱码亚洲一区二区不卡| 欧美人伦禁忌dvd放荡欲情| 欧美网站大全在线观看| 久久国产精品免费| 国产美女精品一区二区三区| 久久精品国产在热久久| 国产精品自在欧美一区| 国产一区二区三区香蕉| 国产成人精品一区二区三区四区 | 91福利区一区二区三区| 欧美日韩免费观看一区二区三区| 欧美在线一二三四区| 99久久精品免费| 欧美日韩国产小视频| 欧美日韩国产高清一区二区 | www欧美成人18+| 久久综合av免费| 亚洲人123区| 亚洲欧美一区二区三区孕妇| 亚洲欧美激情视频在线观看一区二区三区| 国产偷v国产偷v亚洲高清| 国产女人18水真多18精品一级做| 国产精品久久久久久福利一牛影视| 玉米视频成人免费看| 亚洲国产精品综合小说图片区| 免费成人小视频| 国产精品自在在线| 欧美在线观看一区二区| 911精品国产一区二区在线| 日韩欧美中文字幕制服| 亚洲欧洲日韩女同| 亚洲国产综合色| 精品制服美女久久| 丁香婷婷综合五月| 欧美日韩免费一区二区三区视频 | 99久久伊人网影院| 91色porny在线视频| 制服丝袜国产精品| 国产亚洲美州欧州综合国| 一区二区三区在线播| 日韩电影一区二区三区四区| 粉嫩aⅴ一区二区三区四区| 91丨九色porny丨蝌蚪| 日韩色视频在线观看| 国产精品美女久久久久久久| 亚洲毛片av在线| 国产精品中文有码| 欧美制服丝袜第一页| 国产视频一区在线播放| 亚洲宅男天堂在线观看无病毒| 国产黄色精品视频| 欧美视频中文字幕| 日韩一区二区三区高清免费看看| 国产精品蜜臀av| 日韩电影在线免费看| 91无套直看片红桃| 欧美大白屁股肥臀xxxxxx| 亚洲综合小说图片| 国产激情偷乱视频一区二区三区| 欧美精品国产精品| 久久美女艺术照精彩视频福利播放| 亚洲人被黑人高潮完整版| 久久精品国产一区二区三| 99久久综合国产精品| 欧美成人r级一区二区三区| 国产精品国产三级国产aⅴ中文 | 精品一区二区综合| 在线观看免费成人| 亚洲人成影院在线观看| 国产一区亚洲一区| 日韩欧美国产电影| 亚洲小少妇裸体bbw| 国产一区二区伦理| 精品福利二区三区| 三级成人在线视频| 欧美日韩综合不卡| 亚洲欧洲av一区二区三区久久| 国产高清在线观看免费不卡| 日韩欧美黄色影院| 免费成人在线播放| 欧美日本国产一区| 亚洲国产精品一区二区久久| 99精品视频在线播放观看| 精品久久久久久久人人人人传媒 | 亚洲欧洲日韩综合一区二区| 国产九色sp调教91| 久久综合久久鬼色| 免播放器亚洲一区| 日韩精品一区国产麻豆| 天天影视涩香欲综合网| 欧美日本国产视频| 亚洲高清在线精品| 91超碰这里只有精品国产| 一区二区三区日韩| 成人小视频在线观看| 中文字幕一区二区三区视频| 国产成人夜色高潮福利影视| 国产精品少妇自拍| 成人avav在线| 一区二区三区成人| 91欧美激情一区二区三区成人| 中文字幕综合网| 91天堂素人约啪| 亚洲一区二区三区四区在线| 欧美日韩一级片在线观看| 偷偷要91色婷婷| 欧美一级日韩免费不卡| 亚洲网友自拍偷拍| 91精品福利在线一区二区三区 | 久久电影网站中文字幕| 久久久久久久久久久久电影 | 色综合视频在线观看| 亚洲欧美电影院| 成人h动漫精品一区二区| 亚洲精品成人在线| 欧美午夜理伦三级在线观看| 日韩av在线播放中文字幕| 91精品国产综合久久久蜜臀图片| 看片的网站亚洲| 久久久久亚洲综合| 一本到高清视频免费精品| 亚洲黄一区二区三区| 91精品国模一区二区三区| 精彩视频一区二区三区| 日韩欧美一级二级三级久久久| 国产乱国产乱300精品| 亚洲欧洲日韩女同| 欧美一区二区三区在线视频| 精品在线免费观看| 亚洲欧美电影一区二区| 欧美日韩精品一区二区天天拍小说 | 精品日韩欧美在线| 99热精品一区二区| 午夜影院在线观看欧美| 国产蜜臀97一区二区三区| 色88888久久久久久影院按摩| 日本强好片久久久久久aaa| 国产亚洲成年网址在线观看| 在线国产电影不卡| 国内精品嫩模私拍在线| 国产精品久久久久久久久搜平片| 在线观看成人小视频| 图片区日韩欧美亚洲| 国产精品福利一区二区| 欧美体内she精高潮| 成人免费高清在线观看| 午夜国产精品一区|