Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
ppc64-diag
ppc64-diag-tmpraces.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ppc64-diag-tmpraces.patch of Package ppc64-diag
Index: ppc64-diag-2.6.7/lpd/test/lpd_ela_test.sh =================================================================== --- ppc64-diag-2.6.7.orig/lpd/test/lpd_ela_test.sh +++ ppc64-diag-2.6.7/lpd/test/lpd_ela_test.sh @@ -22,7 +22,7 @@ EXECUTION_LOG="$LOG_DIR/$SCRIPT_NAME.log ERROR_LOG="$LOG_DIR/$SCRIPT_NAME.err" TMP_DIR="/var/tmp/ras" -mkdir -p $TMP_DIR +mkdir $TMP_DIR || exit 1 MESSAGE_FILE="$TMP_DIR/messages" TMP_FILE="$TMP_DIR/$SCRIPT_NAME.tmp" Index: ppc64-diag-2.6.7/rtas_errd/diag_support.c =================================================================== --- ppc64-diag-2.6.7.orig/rtas_errd/diag_support.c +++ ppc64-diag-2.6.7/rtas_errd/diag_support.c @@ -230,27 +230,23 @@ get_dt_status(char *dev) char loc_file[80]; char target[80]; char *ptr; - char command[]="/usr/bin/find /proc/device-tree -name status -print > /tmp/get_dt_files"; + char command[]="/usr/bin/find /proc/device-tree -name status -print"; - if (system(command) != 0) { + fp1 = popen(command,"r"); + + if (!fp1) { fprintf(stderr, "get_dt_status find command failed\n"); return NULL; } - /* results of the find command */ - fp1 = fopen("/tmp/get_dt_files", "r"); - if (fp1 == 0) { - fprintf(stderr, "open failed on /tmp/get_dt_files\n"); - return NULL; - } - while (fscanf (fp1, "%s", loc_file) != EOF) { - dbg("read from /tmp/get_dt_files, \"%s\"", loc_file); + dbg("read from find, \"%s\"", loc_file); /* read the status in case this is the one */ fp2 = fopen(loc_file, "r"); if (fp2 == 0) { fprintf(stderr, "open failed on %s\n", loc_file); + pclose(fp1); return NULL; } if (fscanf(fp2, "%s", target_status)) { @@ -259,6 +255,7 @@ get_dt_status(char *dev) } else { fprintf(stderr, "read failed on %s\n", loc_file); + pclose(fp1); return NULL; } @@ -270,6 +267,7 @@ get_dt_status(char *dev) fp2 = fopen(loc_file, "r"); if (fp2 == 0) { fprintf(stderr, "open failed on %s\n", loc_file); + pclose(fp1); return NULL; } @@ -278,6 +276,8 @@ get_dt_status(char *dev) target, loc_file); if (strcmp(dev, target) == 0) { dbg("status = \"%s\"", target_status); + pclose (fp1); + fclose (fp2); return target_status; } @@ -285,11 +285,12 @@ get_dt_status(char *dev) } else { fprintf(stderr, "read failed on %s\n", loc_file); + pclose(fp1); return NULL; } } - fclose(fp1); + pclose(fp1); fprintf(stderr, "error: status NOT FOUND\n"); return NULL; } Index: ppc64-diag-2.6.7/scripts/ppc64_diag_mkrsrc =================================================================== --- ppc64-diag-2.6.7.orig/scripts/ppc64_diag_mkrsrc +++ ppc64-diag-2.6.7/scripts/ppc64_diag_mkrsrc @@ -136,7 +136,7 @@ if (-e "/proc/device-tree/ibm,converged- } # Retrieve Extended Error Data (EED) -mkdir "/tmp/diagSEsnap", 0775; +mkdir "/tmp/diagSEsnap", 0700 || die "mkdir failed: $!"; $general_eed_file = "/tmp/diagSEsnap/snapH.tar.gz"; system("/usr/sbin/snap -o $general_eed_file 2>/dev/null 1>&2"); $cstop_eed_file = "";
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor