search for: buf_sz

Displaying 7 results from an estimated 7 matches for "buf_sz".

2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...in.c b/efi/main.c index 6a748412..d7fb637e 100644 --- a/efi/main.c +++ b/efi/main.c @@ -1008,16 +1008,81 @@ static int exit_boot(struct boot_params *bp) EFI_MEMORY_DESCRIPTOR *map; EFI_STATUS status; uint32_t e820_type; - UINTN i, nr_entries, key, desc_sz; + UINTN i, nr_entries, key, desc_sz, buf_sz, map_sz; UINT32 desc_ver; + /* + * Call once with empty buffer size to + * see how large the buffer should be. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &buf_sz, + map, + &key, + &desc_sz, + &desc_ver); + i...
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...c b/efi/main.c index 6a748412..d7fb637e 100644 --- a/efi/main.c +++ b/efi/main.c @@ -1008,16 +1008,81 @@ static int exit_boot(struct boot_params *bp) EFI_MEMORY_DESCRIPTOR *map; EFI_STATUS status; uint32_t e820_type; - UINTN i, nr_entries, key, desc_sz; + UINTN i, nr_entries, key, desc_sz, buf_sz, map_sz; UINT32 desc_ver; + /* + * Call once with empty buffer size to + * see how large the buffer should be. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &buf_sz, + map, + &key, + &desc_sz, + &desc_ver); + if (!buf_sz) + return -1; +...
2012 Mar 18
3
vhost question
...otify(dev, vq); while (!queue_empty(&node->rxq)) { n = vhost_get_vq_desc(dev, vq, vq->iov, ARRAY_SIZE(vq->iov), &out, &in, NULL, NULL); if (0 < n || n == vq->num) break; if ((t = queue_pop(&node->rxq))) { BUG_ON(copy_to_user(vq->iov[0].iov_base, t->buf, t->buf_sz)); vq->iov[0].iov_len = t->buf_sz; // ToDo: copy_to_user the rx_status vhost_add_used(vq, n, out); transmission_free(t); ++frames; } } if (frames) vhost_signal(dev, vq); vhost_enable_notify(dev, vq); mutex_unlock(&vq->mutex); } static void handle_tx(struct vhost_work *work) { int n; u...
2012 Mar 18
3
vhost question
...otify(dev, vq); while (!queue_empty(&node->rxq)) { n = vhost_get_vq_desc(dev, vq, vq->iov, ARRAY_SIZE(vq->iov), &out, &in, NULL, NULL); if (0 < n || n == vq->num) break; if ((t = queue_pop(&node->rxq))) { BUG_ON(copy_to_user(vq->iov[0].iov_base, t->buf, t->buf_sz)); vq->iov[0].iov_len = t->buf_sz; // ToDo: copy_to_user the rx_status vhost_add_used(vq, n, out); transmission_free(t); ++frames; } } if (frames) vhost_signal(dev, vq); vhost_enable_notify(dev, vq); mutex_unlock(&vq->mutex); } static void handle_tx(struct vhost_work *work) { int n; u...
2004 Mar 09
4
[PATCH] kinit
...9;\0')) { + (argv[i][len] != '\0')) { ret = argv[i] + len; break; } --- klibc-0.115_dev/kinit/do_mounts.c 2003-06-01 08:21:09.000000000 +0200 +++ klibc-0.115/kinit/do_mounts.c 2004-03-10 00:11:55.000000000 +0100 @@ -24,7 +24,7 @@ try_name(char *name, int part) char buf[BUF_SZ]; int range; dev_t res; - char *s; + char *s, *p; int len; int fd; @@ -39,6 +39,11 @@ try_name(char *name, int part) if (len <= 0 || len == BUF_SZ || buf[len - 1] != '\n') goto fail; buf[len - 1] = '\0'; + + for (p = buf; *p; p++) { + if (*p == ':') +...
2007 Aug 24
2
[git patch] klibc bzero, mount fixes + random stuff
....minor = minor; + md_setup_args[ent].minor = minor_num; return 1; } diff --git a/usr/kinit/name_to_dev.c b/usr/kinit/name_to_dev.c index 593bc12..e5ad1cc 100644 --- a/usr/kinit/name_to_dev.c +++ b/usr/kinit/name_to_dev.c @@ -20,7 +20,7 @@ static dev_t try_name(char *name, int part) char path[BUF_SZ]; char buf[BUF_SZ]; int range; - unsigned int major, minor; + unsigned int major_num, minor_num; dev_t res; char *s; int len; @@ -37,13 +37,13 @@ static dev_t try_name(char *name, int part) if (len <= 0 || len == BUF_SZ || buf[len - 1] != '\n') goto fail; buf[len - 1] =...
2019 Jan 22
1
[PATCH] fix build failure when CONFIG_KLIBC_ZLIB is not set
...nit/ramdisk_load.c index 2b3503ad..c30f61c2 100644 --- a/usr/kinit/ramdisk_load.c +++ b/usr/kinit/ramdisk_load.c @@ -13,7 +13,9 @@ #include "kinit.h" #include "do_mounts.h" #include "fstype.h" +#ifdef CONFIG_KLIBC_ZLIB #include "zlib.h" +#endif #define BUF_SZ 65536 @@ -46,6 +48,7 @@ static int change_disk(const char *devpath, int rfd, int disk) return open(devpath, O_RDONLY); } +#ifdef CONFIG_KLIBC_ZLIB /* Also used in initrd.c */ int load_ramdisk_compressed(const char *devpath, FILE * wfd, off_t ramdisk_start) @@ -133,6 +136,7 @@ err2...