#pragma once #include "types.hh" #include "serialise.hh" namespace nix { /* dumpPath creates a Nix archive of the specified path. The format is as follows: IF path points to a REGULAR FILE: dump(path) = attrs( [ ("type", "regular") , ("contents", contents(path)) ]) IF path points to a DIRECTORY: dump(path) = attrs( [ ("type", "directory") , ("entries", concat(map(f, sort(entries(path))))) ]) where f(fn) = attrs( [ ("name", fn) , ("file", dump(path + "/" + fn)) ]) where: attrs(as) = concat(map(attr, as)) + encN(0) attrs((a, b)) = encS(a) + encS(b) encS(s) = encN(len(s)) + s + (padding until next 64-bit boundary) encN(n) = 64-bit little-endian encoding of n. contents(path) = the contents of a regular file. sort(strings) = lexicographic sort by 8-bit value (strcmp). entries(path) = the entries of a directory, without `.' and `..'. `+' denotes string concatenation. */ struct PathFilter { virtual ~PathFilter() { } virtual bool operator () (const Path & path) { return true; } }; extern PathFilter defaultPathFilter; void dumpPath(const Path & path, Sink & sink, PathFilter & filter = defaultPathFilter); struct ParseSink { virtual void createDirectory(const Path & path) { }; virtual void createRegularFile(const Path & path) { }; virtual void isExecutable() { }; virtual void preallocateContents(unsigned long long size) { }; virtual void receiveContents(unsigned char * data, unsigned int len) { }; virtual void createSymlink(const Path & path, const string & target) { }; }; void parseDump(ParseSink & sink, Source & source); void restorePath(const Path & path, Source & source); } ion value='grep'>log msg
path: root/gnu/bootloader/extlinux.scm
AgeCommit message (Expand)Author
2019-03-16bootloader: Use 'invoke/quiet' when running 'grub-install' and co....Ludovic Courtès
2019-03-13Remove traces of "GuixSD"....Ludovic Courtès
2018-11-18bootloader: De-monadify configuration file generators....Ludovic Courtès
2018-05-12bootloader: extlinux: Fix menu support with u-boot....Vagrant Cascadian
2017-12-15bootloader: Factorize write-file-on-device....Mathieu Othacehe
2017-12-04bootloader: extlinux: Stop using dd binary....Mathieu Othacehe
2017-11-23bootloader: extlinux: Fix device tree path....Mathieu Othacehe
2017-07-28bootloader: Use <menu-entry> for the bootloader side....Danny Milosavljevic
2017-06-21bootloader: extlinux: Add extlinux-bootloader-gpt....Mathieu Othacehe
2017-06-08bootloader: Use menu-entry to define custom bootloader entries....Mathieu Othacehe
2017-05-21bootloader: extlinux: Add a warning message on top of generated conf file....Mathieu Othacehe
2017-05-18bootloader: extlinux: Remove syslinux-bootloader....Mathieu Othacehe
2017-05-18bootloader: extlinux: Remove undefined symbols from export list....Mathieu Othacehe
2017-05-16bootloader: Add extlinux support....Mathieu Othacehe