Remove shared or move libkmod-list.c into shared
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 10/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- c, linux
- Ambito
- operating-systems
Direzione di ricerca
The question is where kmod_list code should live: depmod includes libkmod-internal.h to reach the list functions in libkmod/kmod_list.c, and the issue weighs moving them into shared/ against a larger reorganisation. Read the two proposed options and the linked config-handling issue to see the trade-offs. Done means the maintainers pick one layout and agree how depmod should get its list helpers, not that code is written.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Right now, depmod includes libkmod-internal.h to access kmod_list functions, which are supposed to be used within libkmod. They are not exposed through libkmod.h, i.e. they are not part of the public API.
This could be fixed by moving kmod_list.c as list.c into shared, getting rid of libkmod-internal.h usage in depmod. At first, I would have preferred this solution.
But when I looked into config: move config handling to shared/, I noticed that configuration handling uses error logging, accessing ctx for correct logging function etc. This would definitely drag kmod-specific logic into shared, which is currently very independent code.
If we move out the error logging, we would have to repeat the error handling in libkmod-config.c and depmod. Rather easy to do, just duplicated logic again.
Should we expose libkmod functionality to tools, just like we do with libkmod-internal.h in depmod right now, we would also get rid of duplicated instructions in kmod and libkmod, i.e. we would get a smaller binary.
So these are my proposals. Would like to get some feedback which one is preferable.
Option 1
- Move code used in libkmod from shared into libkmod directory (array.c becomes kmod_array.c and all functions get
kmod_prefix) - Move code exclusively used in tools from shared into tools directory
- Create a libkmod-shared.h file in libkmod
- Include libkmod-shared.h in libkmod-internal.h
- Include libkmod-shared.h in tools where needed
This will further reduce the binary size, since commonly used code actually exists only once as machine instructions. The kmod tools have more access into the library than other programs could (which makes them rather dependent on libkmod internals even if public API is stable).
Option 2
- Move kmod_list.c from libkmod into shared (kmod_list.c becomes list.c and all functions lose their
kmod_prefix) - Create shared/list.h
- Replace libkmod-internal.h in depmod with shared/list.h and libkmod.h
This keeps utility code separated from business logic. The kmod tools have same limitations and are as independent from libkmod internal changes as every other program which utilizes libkmod.
- Lingua principale
- C
- Stelle
- 116
- Fork
- 70
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di kmod-project/kmod
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kmod-project/kmod#492 ·
I maintainer di solito rispondono entro 4 giorni
-
good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
kmod-project/kmod#484 · 1 reazione ·
I maintainer di solito rispondono entro 4 giorni
-
good first issue
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
kmod-project/kmod#483 ·
I maintainer di solito rispondono entro 4 giorni
-
Various 34.x backport nominationsForse già presa @lucasdemarchi l’ha presa 6 giorni fa. Apertafor-lucas
kmod-project/kmod#480 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
-
Use `malloc` function attributeForse già presa @crims0n l’ha presa 4 giorni fa. Apertagood first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
kmod-project/kmod#479 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di kmod-project/kmod
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PecanProject/sipnet#435 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
SDL_GPU Vulkan: wrong screen orientation on OpenHarmony (preTransform set without pre-rotation)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
libsdl-org/SDL#16670 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
要トリアージ 辞書
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
yksr-melt/Meltype#1625 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Apertakind/bug priority/medium qa_automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37324 ·
I maintainer di solito rispondono entro 1 giorno