block.c (bbf0a440813816410eeee465b71b37100b2ec9ca) | block.c (51ef67270b1d10e1fcf3de7368dccad1ba0bf9d1) |
---|---|
1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 1885 unchanged lines hidden (view full) --- 1894 return -ENOMEDIUM; 1895 if (drv->bdrv_snapshot_list) 1896 return drv->bdrv_snapshot_list(bs, psn_info); 1897 if (bs->file) 1898 return bdrv_snapshot_list(bs->file, psn_info); 1899 return -ENOTSUP; 1900} 1901 | 1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 1885 unchanged lines hidden (view full) --- 1894 return -ENOMEDIUM; 1895 if (drv->bdrv_snapshot_list) 1896 return drv->bdrv_snapshot_list(bs, psn_info); 1897 if (bs->file) 1898 return bdrv_snapshot_list(bs->file, psn_info); 1899 return -ENOTSUP; 1900} 1901 |
1902int bdrv_snapshot_load_tmp(BlockDriverState *bs, 1903 const char *snapshot_name) 1904{ 1905 BlockDriver *drv = bs->drv; 1906 if (!drv) { 1907 return -ENOMEDIUM; 1908 } 1909 if (!bs->read_only) { 1910 return -EINVAL; 1911 } 1912 if (drv->bdrv_snapshot_load_tmp) { 1913 return drv->bdrv_snapshot_load_tmp(bs, snapshot_name); 1914 } 1915 return -ENOTSUP; 1916} 1917 |
|
1902#define NB_SUFFIXES 4 1903 1904char *get_human_readable_size(char *buf, int buf_size, int64_t size) 1905{ 1906 static const char suffixes[NB_SUFFIXES] = "KMGT"; 1907 int64_t base; 1908 int i; 1909 --- 766 unchanged lines hidden --- | 1918#define NB_SUFFIXES 4 1919 1920char *get_human_readable_size(char *buf, int buf_size, int64_t size) 1921{ 1922 static const char suffixes[NB_SUFFIXES] = "KMGT"; 1923 int64_t base; 1924 int i; 1925 --- 766 unchanged lines hidden --- |