From patchwork Fri Sep 21 08:47:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 185669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0CF612C0086 for ; Fri, 21 Sep 2012 20:13:11 +1000 (EST) Received: from localhost ([::1]:44066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEyvM-0000X0-R7 for incoming@patchwork.ozlabs.org; Fri, 21 Sep 2012 04:49:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEyuN-00082r-62 for qemu-devel@nongnu.org; Fri, 21 Sep 2012 04:48:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEyuH-0004rK-HY for qemu-devel@nongnu.org; Fri, 21 Sep 2012 04:48:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEyuH-0004r5-9t for qemu-devel@nongnu.org; Fri, 21 Sep 2012 04:48:17 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8L8mGQ3015628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Sep 2012 04:48:16 -0400 Received: from trasno.mitica (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8L8lZNc001998; Fri, 21 Sep 2012 04:48:14 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 21 Sep 2012 10:47:23 +0200 Message-Id: <1348217255-22441-30-git-send-email-quintela@redhat.com> In-Reply-To: <1348217255-22441-1-git-send-email-quintela@redhat.com> References: <1348217255-22441-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 29/41] savevm: Remove qemu_fseek() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It has no users, and is only half implemented. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- qemu-file.h | 1 - savevm.c | 21 --------------------- 2 files changed, 22 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index d8487cd..7fe7274 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -232,6 +232,5 @@ static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv) } int64_t qemu_ftell(QEMUFile *f); -int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence); #endif diff --git a/savevm.c b/savevm.c index 1ec6ff1..6865862 100644 --- a/savevm.c +++ b/savevm.c @@ -676,27 +676,6 @@ int64_t qemu_ftell(QEMUFile *f) return f->buf_offset - f->buf_size + f->buf_index; } -int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence) -{ - if (whence == SEEK_SET) { - /* nothing to do */ - } else if (whence == SEEK_CUR) { - pos += qemu_ftell(f); - } else { - /* SEEK_END not supported */ - return -1; - } - if (f->put_buffer) { - qemu_fflush(f); - f->buf_offset = pos; - } else { - f->buf_offset = pos; - f->buf_index = 0; - f->buf_size = 0; - } - return pos; -} - int qemu_file_rate_limit(QEMUFile *f) { if (f->rate_limit)