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:04 +0200 Message-Id: <20190930072613.17956-5-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 04/13] state: Fix lseek error check in state_mtd_peb_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?= VGhpcyBwb3J0cyB0aGUgZm9sbG93aW5nIGJhcmVib3ggY29tbWl0OgoKfCBjb21taXQgNWVhZGQx MWQ0Nzk1YWZiNmI1MjFiNWMzMjQ5YzYzNDFjMGJlNzExNwp8IEF1dGhvcjogQW5kcmV5IFNtaXJu b3YgPGFuZHJldy5zbWlybm92QGdtYWlsLmNvbT4KfCBEYXRlOiAgIFdlZCBNYXIgNiAyMzo0OToy NCAyMDE5IC0wODAwCnwKfCAgICAgc3RhdGU6IEZpeCBsc2VlayBlcnJvciBjaGVjayBpbiBzdGF0 ZV9tdGRfcGViX3dyaXRlKCkKfAp8ICAgICBEb24ndCB1c2UgJ2ludCcgdG8gc3RvcmUgbHNlZWso KSdzIHJldHVybiB2YWx1ZSB0byBhdm9pZCBwcm9ibGVtcyB3aXRoCnwgICAgIGxhcmdlIHNlZWsg b2Zmc2V0cy4gV2hpbGUgYXQgaXQsIG1ha2Ugc3VyZSB0byBwb3B1bGF0ZSByZXR1cm4gZXJyb3IK fCAgICAgY29kZSBmcm9tICdlcnJubycuCnwKfCAgICAgU2lnbmVkLW9mZi1ieTogQW5kcmV5IFNt aXJub3YgPGFuZHJldy5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