Skip to contentSkip to conversation

rename hostap.c to hostap_main.c

PATCH In review Adrian Bunk 3 participants 5 messages Nov 6, 2005 – Nov 13, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rename hostap.c to hostap_main.c

I wanted to remove the #include "hostap_ioctl.c" from hostap.c and build hostap_ioctl.c separately, but this doesn't work since hostap.c has the same name as the module.

After renaming hostap.c this will be possible.

---

 drivers/net/wireless/hostap/Makefile      |   10 
 drivers/net/wireless/hostap/hostap.c      | 1192 ----------------------
 drivers/net/wireless/hostap/hostap_main.c | 1192 ++++++++++++++++++++++
 3 files changed, 1198 insertions(+), 1196 deletions(-)
drivers/net/wireless/hostap/Makefile renamed from drivers/net/wireless/hostap/Makefile.old +6 -4
@@ -1,5 +1,7 @@
-obj-$(CONFIG_HOSTAP) += hostap.o
+hostap-y			:= hostap_main.o
 
-obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
-obj-$(CONFIG_HOSTAP_PLX) += hostap_plx.o
-obj-$(CONFIG_HOSTAP_PCI) += hostap_pci.o
+obj-$(CONFIG_HOSTAP)		+= hostap.o
+
+obj-$(CONFIG_HOSTAP_CS)		+= hostap_cs.o
+obj-$(CONFIG_HOSTAP_PLX)	+= hostap_plx.o
+obj-$(CONFIG_HOSTAP_PCI)	+= hostap_pci.o
drivers/net/wireless/hostap/hostap.c deleted +0 -1192

1,192 lines not on this page · raw message

drivers/net/wireless/hostap/hostap_main.c new file +1192 -0

1,192 lines not on this page · raw message

#1 lore raw
Quoted 3 lines · Adrian Bunk

I wanted to remove the #include "hostap_ioctl.c" from hostap.c and build hostap_ioctl.c separately, but this doesn't work since hostap.c has the same name as the module.

Is this patch changing anything in hostap.c or is it just a rename of the file? Patch file is not exactly ideal for this kind of changes and I hope git has a better way of storing this kind of rename.

I would rather not rename the file, but if this is the only way of getting the module built in pieces, I'm okay with the change (assuming nothing else changed in hostap.c in this changeset).

drivers/net/wireless/hostap/Makefile line 5

Quoted 10 lines

+++ linux-2.6.14-rc5-mm1-full/drivers/net/wireless/hostap/Makefile 2005-11-06 00:14:57.000000000 +0100

drivers/net/wireless/hostap/Makefile renamed from drivers/net/wireless/hostap/Makefile.old +5 -3
@@ -1,5 +1,7 @@
-obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
-obj-$(CONFIG_HOSTAP_PLX) += hostap_plx.o
-obj-$(CONFIG_HOSTAP_PCI) += hostap_pci.o
+obj-$(CONFIG_HOSTAP)		+= hostap.o
+
+obj-$(CONFIG_HOSTAP_CS)		+= hostap_cs.o
+obj-$(CONFIG_HOSTAP_PLX)	+= hostap_plx.o
+obj-$(CONFIG_HOSTAP_PCI)	+= hostap_pci.o

Why were the hostap_{cs,plx,pci} lines changed? I prefer the original version of those lines (i.e., no extra padding).

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#2 lore raw

PATCH 1/1 rename hostap.c to hostap_main.c

Quoted 8 lines · Jouni Malinen
Quoted 3 lines · Adrian Bunk

I wanted to remove the #include "hostap_ioctl.c" from hostap.c and build hostap_ioctl.c separately, but this doesn't work since hostap.c has the same name as the module.

Is this patch changing anything in hostap.c or is it just a rename of the file? Patch file is not exactly ideal for this kind of changes and I hope git has a better way of storing this kind of rename.

There's no other change.

If you agree, Jeff might be able to do the

  mv drivers/net/wireless/hostap/hostap.c \
    drivers/net/wireless/hostap/hostap_main.c

plus applying the patch below.

Quoted 4 lines

I would rather not rename the file, but if this is the only way of getting the module built in pieces, I'm okay with the change (assuming nothing else changed in hostap.c in this changeset).
...

AFAIK you can't build a module hostap.o consisting of multiple objects with the source files of one of them named hostap.c (Sam Cc'ed for this).

Quoted 1 line

Jouni Malinen PGP id EFC895FA

cu
Adrian

<-- snip -->

I wanted to remove the #include "hostap_ioctl.c" from hostap.c and build hostap_ioctl.c separately, but this doesn't work since hostap.c has the same name as the module.

After renaming hostap.c this will be possible.

drivers/net/wireless/hostap/Makefile renamed from drivers/net/wireless/hostap/Makefile.old +1 -0
@@ -1,3 +1,4 @@
+hostap-y := hostap_main.o
 obj-$(CONFIG_HOSTAP) += hostap.o
 
 obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
#3 lore raw
Quoted 8 lines · Adrian Bunk

There's no other change.

If you agree, Jeff might be able to do the

  mv drivers/net/wireless/hostap/hostap.c \
    drivers/net/wireless/hostap/hostap_main.c

plus applying the patch below.

OK, I'm okay with that change.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#4 lore raw
In reply to Adrian Bunk
Quoted 3 lines

AFAIK you can't build a module hostap.o consisting of multiple objects with the source files of one of them named hostap.c (Sam Cc'ed for this).

Correct.

Sam