mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
xbmc:
- cleanup xbmc scriptdir
This commit is contained in:
parent
d7c35da327
commit
526899a133
@ -1,67 +0,0 @@
|
||||
diff -Naur xbmc-23757/xbmc-xrandr.c xbmc-23757.patch/xbmc-xrandr.c
|
||||
--- xbmc-23757/xbmc-xrandr.c 2009-10-16 18:41:57.000000000 +0200
|
||||
+++ xbmc-23757.patch/xbmc-xrandr.c 2009-10-17 05:15:34.000000000 +0200
|
||||
@@ -2257,7 +2257,7 @@
|
||||
mode_height (mode, output->rotation),
|
||||
output->x, output->y);
|
||||
if (verbose)
|
||||
- printf (" id=\"%x\"", mode->id);
|
||||
+ printf (" id=\"%x\"", (int)mode->id);
|
||||
if (output->rotation != RR_Rotate_0 || verbose)
|
||||
{
|
||||
printf (" rotation=\"%s\"",
|
||||
@@ -2294,14 +2294,14 @@
|
||||
if (mode)
|
||||
{
|
||||
printf (" wmm=\"%d\" hmm=\"%d\"",
|
||||
- output_info->mm_width, output_info->mm_height);
|
||||
+ (int)output_info->mm_width, (int)output_info->mm_height);
|
||||
}
|
||||
printf (">\n");
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
- printf ("\tIdentifier: 0x%x\n", output->output.xid);
|
||||
- printf ("\tTimestamp: %d\n", output_info->timestamp);
|
||||
+ printf ("\tIdentifier: 0x%x\n", (int)output->output.xid);
|
||||
+ printf ("\tTimestamp: %d\n", (int)output_info->timestamp);
|
||||
printf ("\tSubpixel: %s\n", order[output_info->subpixel_order]);
|
||||
printf ("\tClones: ");
|
||||
for (j = 0; j < output_info->nclone; j++)
|
||||
@@ -2358,15 +2358,15 @@
|
||||
{
|
||||
printf("\t%s: %d (0x%08x)",
|
||||
XGetAtomName (dpy, props[j]),
|
||||
- *(INT32 *)prop, *(INT32 *)prop);
|
||||
+ (int)(INT32 *)prop, (int)(INT32 *)prop);
|
||||
|
||||
if (propinfo->range && propinfo->num_values > 0) {
|
||||
printf(" range%s: ",
|
||||
(propinfo->num_values == 2) ? "" : "s");
|
||||
|
||||
for (k = 0; k < propinfo->num_values / 2; k++)
|
||||
- printf(" (%d,%d)", propinfo->values[k * 2],
|
||||
- propinfo->values[k * 2 + 1]);
|
||||
+ printf(" (%d,%d)", (int)propinfo->values[k * 2],
|
||||
+ (int)propinfo->values[k * 2 + 1]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
@@ -2410,7 +2410,7 @@
|
||||
int f;
|
||||
|
||||
printf (" %s (0x%x) %6.1fMHz",
|
||||
- mode->name, mode->id,
|
||||
+ mode->name, (int)mode->id,
|
||||
(float)mode->dotClock / 1000000.0);
|
||||
for (f = 0; mode_flags[f].flag; f++)
|
||||
if (mode->modeFlags & mode_flags[f].flag)
|
||||
@@ -2443,7 +2443,7 @@
|
||||
if (strcmp (jmode->name, kmode->name) != 0) continue;
|
||||
mode_shown[k] = True;
|
||||
kmode->modeFlags |= ModeShown;
|
||||
- printf (" <mode id=\"0x%x\" name=\"%s\" w=\"%d\" h=\"%d\" hz=\"%.5f\"", kmode->id, kmode->name, kmode->width, kmode->height, mode_refresh (kmode));
|
||||
+ printf (" <mode id=\"0x%x\" name=\"%s\" w=\"%d\" h=\"%d\" hz=\"%.5f\"", (int)kmode->id, kmode->name, kmode->width, kmode->height, mode_refresh (kmode));
|
||||
if (kmode == output->mode_info)
|
||||
printf (" current=\"true\"");
|
||||
else
|
@ -1,46 +0,0 @@
|
||||
diff -Naur xbmc/xbmc/linux/NetworkLinux.cpp xbmc.patch/xbmc/linux/NetworkLinux.cpp
|
||||
--- xbmc/xbmc/linux/NetworkLinux.cpp 2009-10-21 07:57:27.000000000 +0200
|
||||
+++ xbmc.patch/xbmc/linux/NetworkLinux.cpp 2009-11-05 03:20:12.898254181 +0100
|
||||
@@ -549,7 +549,7 @@
|
||||
assignment = NETWORK_DISABLED;
|
||||
|
||||
#ifndef __APPLE__
|
||||
- FILE* fp = fopen("/etc/network/interfaces", "r");
|
||||
+ FILE* fp = fopen("/storage/.config/interfaces", "r");
|
||||
if (!fp)
|
||||
{
|
||||
// TODO
|
||||
@@ -625,7 +625,7 @@
|
||||
void CNetworkInterfaceLinux::SetSettings(NetworkAssignment& assignment, CStdString& ipAddress, CStdString& networkMask, CStdString& defaultGateway, CStdString& essId, CStdString& key, EncMode& encryptionMode)
|
||||
{
|
||||
#ifndef __APPLE__
|
||||
- FILE* fr = fopen("/etc/network/interfaces", "r");
|
||||
+ FILE* fr = fopen("/storage/.config/interfaces", "r");
|
||||
if (!fr)
|
||||
{
|
||||
// TODO
|
||||
@@ -701,13 +701,13 @@
|
||||
fclose(fw);
|
||||
|
||||
// Rename the file
|
||||
- if (rename("/tmp/interfaces.temp", "/etc/network/interfaces") < 0)
|
||||
+ if (rename("/tmp/interfaces.temp", "/storage/.config/interfaces") < 0)
|
||||
{
|
||||
// TODO
|
||||
return;
|
||||
}
|
||||
|
||||
- std::string cmd = "/sbin/ifdown " + GetName();
|
||||
+ std::string cmd = "/sbin/ifdown -i /storage/.config/interfaces " + GetName();
|
||||
if (system(cmd.c_str()) != 0)
|
||||
CLog::Log(LOGERROR, "Unable to stop interface %s", GetName().c_str());
|
||||
else
|
||||
@@ -715,7 +715,7 @@
|
||||
|
||||
if (assignment != NETWORK_DISABLED)
|
||||
{
|
||||
- cmd = "/sbin/ifup " + GetName();
|
||||
+ cmd = "/sbin/ifup -i /storage/.config/interfaces " + GetName();
|
||||
if (system(cmd.c_str()) != 0)
|
||||
CLog::Log(LOGERROR, "Unable to start interface %s", GetName().c_str());
|
||||
else
|
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# Start XBMC Mediacenter program.
|
||||
#
|
||||
# The XBMC Mediacenter program (not the window manager) is the application that
|
||||
# runs in the foreground because it is the only application that we can be sure
|
||||
# will be running.
|
||||
################################################################################
|
||||
|
||||
. /etc/sysconfig
|
||||
|
||||
export XBMC_HOME="/usr/share/xbmc"
|
||||
args="--standalone -fs --lircdev $LIRC_OUTPUT"
|
||||
|
||||
print_crash_report()
|
||||
{
|
||||
FILE="/storage/OpenELEC_crashlog-`date +%Y%m%d_%H%M%S`.log"
|
||||
CORE=`ls -d core* | head -n1`
|
||||
echo "############## XBMC CRASH LOG ###############" >> $FILE
|
||||
echo >> $FILE
|
||||
echo "################ SYSTEM INFO ################" >> $FILE
|
||||
echo -n " Date: " >> $FILE
|
||||
date >> $FILE
|
||||
echo " XBMC Options: $*" >> $FILE
|
||||
echo -n " Arch: " >> $FILE
|
||||
uname -m >> $FILE
|
||||
echo -n " Kernel: " >> $FILE
|
||||
uname -rvs >> $FILE
|
||||
echo -n " Release: " >> $FILE
|
||||
cat /etc/openelec-release >> $FILE
|
||||
echo "############## END SYSTEM INFO ##############" >> $FILE
|
||||
echo >> $FILE
|
||||
echo "############### STACK TRACE #################" >> $FILE
|
||||
gdb /usr/share/xbmc/xbmc.bin --core=$CORE --batch -ex "thread apply all bt" 2> /dev/null >> $FILE
|
||||
rm -f $CORE
|
||||
echo "############# END STACK TRACE ###############" >> $FILE
|
||||
echo >> $FILE
|
||||
echo "################# LOG FILE ##################" >> $FILE
|
||||
echo >> $FILE
|
||||
if [ -f ~/.xbmc/temp/xbmc.log ]; then
|
||||
cat ~/.xbmc/temp/xbmc.log >> $FILE
|
||||
echo >> $FILE
|
||||
else
|
||||
echo "Logfile not found in the usual place." >> $FILE
|
||||
echo "Please attach it seperately." >> $FILE
|
||||
echo "Use pastebin.com or similar for forums or IRC." >> $FILE
|
||||
fi
|
||||
echo >> $FILE
|
||||
echo "############### END LOG FILE ################" >> $FILE
|
||||
echo >> $FILE
|
||||
echo "############ END XBMC CRASH LOG #############" >> $FILE
|
||||
echo "Crash report available at $FILE"
|
||||
}
|
||||
|
||||
ulimit -c unlimited
|
||||
|
||||
while true
|
||||
do
|
||||
DISPLAY=:0.0 /usr/bin/xbmc ${args} > /dev/null 2>&1
|
||||
RET=$?
|
||||
echo "Exited with code $RET"
|
||||
|
||||
if [ "$RET" == 0 ]; then
|
||||
break
|
||||
|
||||
elif [ "$RET" == 64 ]; then
|
||||
sync
|
||||
poweroff
|
||||
|
||||
elif [ "$RET" == 65 ]; then
|
||||
LOOP=1
|
||||
|
||||
elif [ "$RET" == 66 ]; then
|
||||
sync
|
||||
reboot
|
||||
|
||||
elif [ "$RET" >= 131 ] && [ "$RET" <= 136 ]; then
|
||||
print_crash_report
|
||||
|
||||
elif [ "$RET" == 139 ]; then
|
||||
print_crash_report
|
||||
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user