mirror of
https://github.com/clearlinux/clr-debug-info.git
synced 2026-09-06 05:41:43 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09affa9bf5 | ||
|
|
2a217476f7 | ||
|
|
4d6639148f | ||
|
|
83509e34c7 |
@@ -4,7 +4,6 @@ Description=Clear Linux debuginfo daemon
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/clr_debug_daemon
|
||||
ExecStopPost=umount /run/user/0/debug-lib ; umount /run/user/0/debug-src
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.66])
|
||||
AC_INIT(clr-debug-info, 7, arjan@linux.intel.com)
|
||||
AC_INIT(clr-debug-info, 9, arjan@linux.intel.com)
|
||||
AM_INIT_AUTOMAKE([foreign -Wall -W])
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PROG_CC
|
||||
|
||||
+2
-2
@@ -8,5 +8,5 @@
|
||||
# See tmpfiles.d(5) for details
|
||||
|
||||
# Clear tmp directories separately, to make them easier to override
|
||||
d /usr/lib/.debug 755 root root 10d
|
||||
d /usr/src/.debug 755 root root 1d
|
||||
d /var/cache/debuginfo/lib 755 root root 10d
|
||||
d /var/cache/debuginfo/src 755 root root 1d
|
||||
|
||||
+4
-4
@@ -608,18 +608,18 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
char * fake_argv[20];
|
||||
char *dir = "/usr/src/debug";
|
||||
char *shadowdir = "/usr/src/.debug";
|
||||
char *shadowdir = "/var/cache/debuginfo/src";
|
||||
umask(0);
|
||||
|
||||
system("modprobe fuse");
|
||||
signal(SIGPIPE,SIG_IGN);
|
||||
|
||||
system("mkdir -p /usr/lib/.debug &> /dev/null");
|
||||
system("mkdir -p /usr/src/.debug &> /dev/null");
|
||||
system("mkdir -p /var/cache/debuginfo/lib &> /dev/null");
|
||||
system("mkdir -p /var/cache/debuginfo/src &> /dev/null");
|
||||
|
||||
if (fork() == 0) {
|
||||
dir = "/usr/lib/debug";
|
||||
shadowdir = "/usr/lib/.debug";
|
||||
shadowdir = "/var/cache/debuginfo/lib";
|
||||
prefix = "lib";
|
||||
|
||||
}
|
||||
|
||||
+13
-11
@@ -161,10 +161,11 @@ out:
|
||||
static void recurse_dir(char *base1, char *base2, char *path)
|
||||
{
|
||||
DIR *dir;
|
||||
char *fullpath1, *newpath;
|
||||
char *fullpath1, *fullpath2, *newpath;
|
||||
struct dirent *entry;
|
||||
|
||||
fullpath1 = NULL;
|
||||
fullpath2 = NULL;
|
||||
|
||||
|
||||
if (asprintf(&fullpath1, "%s%s", base1, path) < 0)
|
||||
@@ -184,20 +185,21 @@ static void recurse_dir(char *base1, char *base2, char *path)
|
||||
continue;
|
||||
if (strcmp(entry->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
if (entry->d_type == DT_DIR) {
|
||||
newpath = NULL;
|
||||
if (asprintf(&newpath, "%s/%s", path, entry->d_name) >= 0) {
|
||||
|
||||
newpath = NULL;
|
||||
fullpath2 = NULL;
|
||||
asprintf(&fullpath2, "%s/%s", fullpath1, entry->d_name);
|
||||
if (asprintf(&newpath, "%s/%s", path, entry->d_name) >= 0) {
|
||||
struct stat sb;
|
||||
stat(fullpath2, &sb);
|
||||
|
||||
if (entry->d_type == DT_DIR || S_ISDIR(sb.st_mode)) {
|
||||
do_one_file(base1, base2, newpath, 1);
|
||||
recurse_dir(base1, base2, newpath);
|
||||
free(newpath);
|
||||
}
|
||||
} else {
|
||||
newpath = NULL;
|
||||
if (asprintf(&newpath, "%s/%s", path, entry->d_name) >= 0) {
|
||||
} else {
|
||||
do_one_file(base1, base2, newpath, 0);
|
||||
free(newpath);
|
||||
}
|
||||
free(newpath);
|
||||
}
|
||||
}
|
||||
closedir(dir);
|
||||
|
||||
+2
-2
@@ -230,8 +230,8 @@ int main(int argc, char **argv)
|
||||
|
||||
signal(SIGPIPE,SIG_IGN);
|
||||
|
||||
system("mkdir -p /usr/lib/.debug &> /dev/null");
|
||||
system("mkdir -p /usr/src/.debug &> /dev/null");
|
||||
system("mkdir -p /var/cache/debuginfo/lib/ &> /dev/null");
|
||||
system("mkdir -p /var/cache/debuginfo/src/ &> /dev/null");
|
||||
|
||||
|
||||
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
|
||||
Reference in New Issue
Block a user