Skip to contentSkip to conversation

uml: remove elf.h [ compile-fix, for 2.6.12 ]

PATCH In review [email protected] 6 participants 7 messages May 9, 2005 – May 10, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 uml: remove elf.h [ compile-fix, for 2.6.12 ]

Actually remove elf.h in the tree. The previous patch, due to a quilt bug/misuse, left it in the tree as a 0-length file, preventing the build to see it as missing and to generate a symlink in its place.

---

| 0

 1 files changed

diff -L include/asm-um/elf.h -puN include/asm-um/elf.h~uml-remove-elf-h /dev/null _

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 6 lines · [email protected] wrote:

Actually remove elf.h in the tree. The previous patch, due to a quilt bug/misuse, left it in the tree as a 0-length file, preventing the build to see it as missing and to generate a symlink in its place.

Quoted 7 lines

---

| 0

 1 files changed

diff -L include/asm-um/elf.h -puN include/asm-um/elf.h~uml-remove-elf-h /dev/null

hmm, that's exciting. How to tell diff and patch to remove a zero-length file?

bix:/home/akpm> mkdir a b
bix:/home/akpm> touch a/a
bix:/home/akpm> diff -uNr a b
bix:/home/akpm> diff -u a b
Only in a: a
bix:/home/akpm> diff -ur a b
Only in a: a
bix:/home/akpm> diff -uPr a b
Only in a: a

I'll just ask Linus to delete it ;)

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 4 lines · Andrew Morton
Quoted 3 lines · [email protected] wrote:

Actually remove elf.h in the tree. The previous patch, due to a quilt bug/misuse, left it in the tree as a 0-length file, preventing the build to see it as missing and to generate a symlink in its place.

Ok, I was confused by the fact that with patch-scripts, which you use, it works, and thought it was patch to make it work.

Signature · 4 lines
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
#3 lore raw
In reply to Andrew Morton
Quoted 4 lines · Andrew Morton
Quoted 1 line

diff -L include/asm-um/elf.h -puN include/asm-um/elf.h~uml-remove-elf-h /dev/null

hmm, that's exciting. How to tell diff and patch to remove a zero-length file?

This has to be instructed by the patch.. If the new file is an empty file with timestamp of 1 Jan 1970 then it is supposed to be deleted.

The /dev/null trick only works well for adding files, not removing them.

Regards
Henrik

#4 lore raw
Quoted 2 lines · Henrik Nordstrom

...
The /dev/null trick only works well for adding files, not removing them.

It works fine for removing files except when they have a zero length.

Quoted 2 lines

Regards
Henrik

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#5 lore raw
Quoted 6 lines · Adrian Bunk
Quoted 2 lines · Henrik Nordstrom

...
The /dev/null trick only works well for adding files, not removing them.

It works fine for removing files except when they have a zero length.

Then a two-patch approach would seem to work as a hack. First patch just adds a blank line to the file making in non-zero length, second patch then uses the /dev/null trick to kill the file. A hack? Yes, certainly, but it sounds like it would work (actually, it does work, just tried it).

Signature · 13 lines
Jesper Juhl



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#6 lore raw
In reply to Andrew Morton
Quoted 1 line · Andrew Morton

I'll just ask Linus to delete it ;)

make distclean should delete it too. I never worry about zero length file, they'll be deleted eventually.

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel