On 01.01.2013 15:42, Colin Watson wrote: > I have a number of patches mostly ready to go, but I'd prefer to make > sure that this general approach is agreed before preparing and sending > more than one of them. I'd like to work one *_iterate function at a > time (except where multiple iterators are entangled in a stack such that > we need to change several at once, as is the case in parts of the > disk/filesystem stacks), as that's roughly the minimum sensible unit and > it makes it reasonably easy to grep for missing changes.
There is also another approach of using iterators of the kind:
struct pci_iterator;
void pci_init (struct pci_iterator *pci);
int pci_iter (struct pci_iterator *pci);
#define FOR_PCI_DEVICE(x) for (pci_init (&x); pci_iter (&x);)
I have done it for PCI but seem to have bzr problem:
bzr: ERROR: Revision {[email protected]}
not present in
"Graph(StackedParentsProvider(bzrlib.repository._LazyListJoin(([CachingParentsProvider(CallableToParentsProviderAdapter(<bound
method CHKInventoryRepository._get_parent_map_no_fallbacks of
CHKInventoryRepository('file:///home/phcoder/grub2/bzr/.bzr/repository/')>))],
[]))))".
Admittingly for disk/filesystems it's not viable and even for PCI it was
somewhat messy but may be viable in some cases like where we already
switch to FOR_* macros.
>
> Please review.
>
> Thanks,
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
