实际上,问题是,系统升级时,应在根目录中写入“ DISABLE_BACKUP”文件。当它出现时,我必须检查文件是否已经在根目录中。
if ((dir = opendir ("/"))!=NULL)
{
while ((ent = readdir(dir)) != NULL)
{
printf ("%s\n", ent->d_name);
//Here i have to compare the filename (DISABLE_BACKUP) with the string "DISABLE_BACKUP" and has to raise log entry.
}
closedir(dir);
}