[Mplayerplug-in-devel] New version of my patch
Brought to you by:
kdekorte
From: Michael R. <mi...@mi...> - 2005-08-01 01:46:52
|
Hi Kevin, A small error in the patch send before. This one should be used: --- plugin-ui.cpp 2005-08-01 00:03:31.540847840 +0200 +++ plugin-ui.cpp-new 2005-08-01 03:37:28.387088728 +0200 @@ -1676,9 +1676,26 @@ ret =3D rename(tmp_name, config_name); if (ret =3D=3D -1) { ret =3D errno; - if (DEBUG) { + if (ret =3D=3D 18) { + /* Dealing with a link to another file system */ + input =3D fopen(tmp_name, "r"); + output =3D fopen(config_name, "w"); + if (input !=3D NULL && output !=3D NULL) { + if (DEBUG) + printf("update existing config on and external =20 file system\n"); + while (fgets(buffer, sizeof(buffer), input) !=3D =20 NULL) { + fprintf(output, "%s", buffer); + } + fclose(input); + fclose(output); + unlink(tmp_name); + } + } + else { + if (DEBUG) { printf("Unable to rename the file %s to =20 %s\n",tmp_name,config_name); printf("Error code: %i - =20 %s\n",ret,strerror(ret)); + } } } } else { @@ -1700,9 +1717,26 @@ ret =3D rename(tmp_name, config_name); if (ret =3D=3D -1) { ret =3D errno; - if (DEBUG) { + if (ret =3D=3D 18) { + /* Dealing with a link to another file system */ + input =3D fopen(tmp_name, "r"); + output =3D fopen(config_name, "w"); + if (input !=3D NULL && output !=3D NULL) { + if (DEBUG) + printf("update existing config on and =20 external file system\n"); + while (fgets(buffer, sizeof(buffer), input) =20 =3D NULL) { + fprintf(output, "%s", buffer); + } + fclose(input); + fclose(output); + unlink(tmp_name); + } + } + else { + if (DEBUG) { printf("Unable to rename the file %s to =20 %s\n",tmp_name,config_name); printf("Error code: %i - =20 %s\n",ret,strerror(ret)); + } } } } --=20 Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E mir <at> datanom <dot> net http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C mir <at> miras <dot> org http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917 -------------------------------------------------------------- Debian Hint #19: If you're interested in building packages from source, =20 you should consider installing the apt-src package. |