From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: =?UTF-8?q?Ulrich=20=C3=96lmann?= Date: Mon, 30 Sep 2019 09:26:02 +0200 Message-Id: <20190930072613.17956-3-u.oelmann@pengutronix.de> In-Reply-To: <20190930072613.17956-1-u.oelmann@pengutronix.de> References: <20190930072613.17956-1-u.oelmann@pengutronix.de> MIME-Version: 1.0 Subject: [OSS-Tools] [PATCH dt-utils 02/13] state: Fix lseek error check in state_backend_bucket_direct_write() List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: oss-tools-bounces@pengutronix.de Sender: "OSS-Tools" To: Pengutronix Public Open-Source-Development Cc: =?UTF-8?q?Ulrich=20=C3=96lmann?= VGhpcyBwb3J0cyB0aGUgZm9sbG93aW5nIGJhcmVib3ggY29tbWl0OgoKfCBjb21taXQgZWMyNWVj ZmJjYjQ3Y2I4M2IzMTBiOWUxNzdhNWI2NWRlMzc4MWRlYwp8IEF1dGhvcjogQW5kcmV5IFNtaXJu b3YgPGFuZHJldy5zbWlybm92QGdtYWlsLmNvbT4KfCBEYXRlOiAgIFdlZCBNYXIgNiAyMzo0OToy MiAyMDE5IC0wODAwCnwKfCAgICAgc3RhdGU6IEZpeCBsc2VlayBlcnJvciBjaGVjayBpbiBzdGF0 ZV9iYWNrZW5kX2J1Y2tldF9kaXJlY3Rfd3JpdGUoKQp8CnwgICAgIERvbid0IHVzZSAnaW50JyB0 byBzdG9yZSBsc2VlaygpJ3MgcmV0dXJuIHZhbHVlIHRvIGF2b2lkIHByb2JsZW1zIHdpdGgKfCAg ICAgbGFyZ2Ugc2VlayBvZmZzZXRzLiBXaGlsZSBhdCBpdCwgbWFrZSBzdXJlIHRvIHBvcHVsYXRl IHJldHVybiBlcnJvcgp8ICAgICBjb2RlIGZyb20gJ2Vycm5vJy4KfAp8ICAgICBTaWduZWQtb2Zm LWJ5Oi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